ms-access


Microsoft Access returns multiple rows, but I only want to display one


I'm using Microsoft Access 2007 to query two separate SharePoint sources.
The first has most of the data I need. The unique ID number for each row in the first has a corresponding column in the second. The ID from the first can occur multiple times in the second. (It's a mapping between two different databases of defects.)first.
What I want to do is this: find all the ID's from table one that occur in the second, and list ID's from the second for each item that corresponds with the first. For starters, I want something a bit like this:
Table 1 ID Table 2 ID's
5 9, 13, 23
10 11, 15
20 8
But there's also more data from Table 1 I want to display for each item.
What I'm getting is this:
Table 1 ID Table 2 ID Table 1 Data
5 9 Row 5 Additional Data
5 13 Row 5 Additional Data
5 23 Row 5 Additional Data
10 11 Row 10 Additional Data
10 15 Row 10 Additional Data
20 8 Row 20 Additional Data
What I want is something like this:
Table 1 ID Table 2 ID's Table 1 Data
5 9, 13, 23 Row 5 Additional Data
10 11, 15 Row 10 Additional Data
20 8 Row 20 Additional Data
Or perhaps:
Table 1 ID Table 2 ID's
5 9, 13, 23
Row 5 Additional Data
10 11, 15
Row 10 Additional Data
20 8
Row 20 Additional Data
How can I create a report like that?
Comma-separated list from multiple records
Grouping of multiple data rows into a comma-separated list is not a built-in feature of Access. There are various ways to do this, but I most often see links to Allen Browne's tutorial.
Multi-line row details
The difference between your last two examples is just a matter of formatting a Form or Report in Design View. A Report (here capitalized) in Access is a specific type of object for generating custom, formatted views of your data, often for printing or read-only viewing. A Form is a dynamic, on-screen view of your data. I suspect that your use of "report" is of a more general sense.
First of all, there is no way to make multiple lines using the default Datasheet View of tables and queries. To get multiple lines per row of data, you need to create a Form or Report object in Access. In Design View, you can move the data controls around the detail area to produce multiple lines for each data row. I suggest searching for tutorials on the web for creating Access Forms and Reports.
See Guide to designing reports.

Related Links

Finding Autonumber ID for new record in Access 2007
Does MS Access Runtime 2010 works well on system with previous version of Access/Office installed?
“Too many indexes on table” error when creating relationships in Microsoft Access 2010
Display related fields from another table on a Microsoft Access form
How to pass values from client side html to server side in classic asp or vbscript?
Access Report ignores DISTINCROW in query
checking whether field in table has space or comma - MS-Access
Forms and Subforms in Access 2003
EasyPHP connecting to MS Access
Access 2010 Runtime question
Access Input textbox on Data Access page with only select enabled to allow filter by searchs
Microsoft Access Query through VBA gets repeated?
What sort of functionality can I expect from exporting a Microsoft Access 2007 Database to a WSS 3.0 site?
query muliple fields with multiple values
Force OpenCurrentDatabase to use Access 2003
ACCESS/VBA: How to create a ON/OFF type switch to allow record modification on a form?

Categories

HOME
cakephp
sendgrid
google-chrome-extension
bluetooth
atom-editor
isabelle
tizen
plone
office365api
dot
alfresco
at-command
google-project-tango
callback
ravendb
opengl-es-2.0
autotools
append
nano-server
modx-revolution
qt-creator
n-gram
static-libraries
designer
workload-scheduler
foselasticabundle
windows-7-x64
undefined
dbext
riot.js
jquery-ajaxq
facebook-instant-articles
kvc
centos6.5
dynamic-featured-image
traffic
filezilla
minitab
calibre
asset-pipeline
hexo
overriding
devextreme
android-browser
c11
unobtrusive-validation
hue
ansible-playbook
eclipse-scout
botbuilder
android-mediaprojection
auto-update
apache-fop
zip4j
winscp-net
git-diff
tactic
google-perftools
android-cursor
messenger
google-feed-api
azure-virtual-network
pcf
qpid
lttng
testng-dataprovider
qgraphicsview
php-internals
design-by-contract
historian
spim
cartesian-product
google-places
eclipse-clp
t4mvc
pundit
tarjans-algorithm
embedded-code
cakephp-3.1
microbenchmark
method-parameters
event-bubbling
vstest.console.exe
inmobi
csquery
formatjs
block-device
tween
c3
tt-news
onactivityresult
uitouch
phpthumb
mysql-error-1062
oracle-warehouse-builder
stxxl
dir
spring-io
apc
xamlparseexception
cassini-dev
gil
cisco-jtapi
bluepill
javaspaces
viewswitcher
removeclass
hgsubversion
window-management
coercion
winbugs14
pyinotify
dbal
simpletest
project-hosting
zend-decorators

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App