Query showing all records from child table

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?
 
J

Jerry Whittle

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?
 
J

Jesse

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?
 
J

Jerry Whittle

Hummmm. By 'underneath' are you talking about a dropdown combo box displaying
the records?
 
J

Jesse

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"?
 
J

Jerry Whittle

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top