X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Query Result Shows Multiple Records, Access 2010    
post Oct 10 2019, 05:45 PM

Posts: 423
Joined: 10-August 08

Hi Access Helpers!
I created a database with 2 tables
both tables are on 1 form, tblDriverInfo as a subform inside frmCrashData

link for tables in the form is CaseLocationID and DriverInfoID AND CASENO

ok when I run a query that requires fields from both tables I get double records or triple records depending on the amount of DRIVERS in tblDriverInfo

Is there a way to have 1 record that includes all of the drivers (instead of multiple records)
Go to the top of the page
post Oct 10 2019, 06:06 PM

Posts: 867
Joined: 25-January 16

Requires VBA code. Review http://allenbrowne.com/func-concat.html

This is commonly done for report output.

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
post Oct 11 2019, 03:16 AM

Posts: 1,424
Joined: 2-April 09
From: somewhere out there...

add the DriverInfoID field to tblCaseLocation so only that driver is involved in that Case.

Never stop learning, because life never stops teaching.
Go to the top of the page
post Oct 11 2019, 06:56 AM

UtterAccess VIP
Posts: 10,080
Joined: 25-October 10
From: Gulf South USA

Hi Patty: PMFJI, but I thought you might like a demo to see how this can be solved. I use theDBguy's SimpleCSV to do this sort of thing (no disrespect to Allen Browne). Take a look at the query. See if this is what you are trying to achieve.

I had to make some assumptions about your db, of course, so you will have to adjust to your design.


Attached File(s)
Attached File  OneToManyOnSingleRow.zip ( 20.87K )Number of downloads: 1

"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    15th October 2019 - 03:58 AM