Query showing all records from child table

  • Thread starter Thread starter Jesse
  • Start date Start date
J

Jesse

I have two tables, a parent and child (related with a one to many
relationship). I am selecting a specific record from the parent table. I am
trying to show the related records from the child table of that selection
underneath, but all the records from the child table are being displayed, not
just the related records of the selection. Any ideas?
 
Assuming that you are in the query design view:

1. Is there a line between the two tables?

2. Does that line go from the Primary Key of the parent table to the foriegn
key in the child table?
 
Yes to both.

--
Thanks,
Jesse


Jerry Whittle said:
Assuming that you are in the query design view:

1. Is there a line between the two tables?

2. Does that line go from the Primary Key of the parent table to the foriegn
key in the child table?
 
Hummmm. By 'underneath' are you talking about a dropdown combo box displaying
the records?
 
Sorry, I'm kinda new to Access. I am trying to show the result just as the
table would look if you opened the parent table, with the plus sign on the
left to show the related records below the parent record. I found in the
Query Properties if I add the child table as the "Subdatasheet Name" I get my
result, but showing all the records and not the related ones. Is it just
another property I have to set, like "Link Child Fields" or "Link Master
Fields"?
 
I never use this 'feature' except to show it to my students and then tell
them what a bad idea it is to work directly with data at table level.

I think that the reason you see all the related records is that they are
there so that you can pick one to change the record.

I suggest that you present the data in a normal query view; or a form with a
subform; or maybe even a Pivot Form view.
 
Back
Top