Why only one record showing?

T

Tony Williams

I have a form that I originally built on a query which had two linked
tables. I've now realised that all the controls on my form are actually in
one table so I deleted the other table from the query. However now my form
only shows the first record. There are controls on the form that reference
the other table in DLookup expressions but I didn't think the table had to
be part of the query for them to work. if I put the table back in the query
and include all the fields using the * it works. However if I take the ID,
which is the primary key field, out of the query of the second table and add
the fields from the second table individually, it doesn't. Anyone any ideas?
Thanks
 
J

Jeanette Cunningham

Hi Tony,

It is usual to use all the tables needed for a form in a query that is the
record source for the form.
It is easier than using DLookup to get values for controls.

The query would normally have both tables in it and they would be joined on
the primary key joining to the ID field as the foreign key.
Is this how you have it setup?

It would be easier to help you if you could give some information about the
2 tables.
What fields do they have including the primary key, and which field is the
foreign key on which the 2 tables are joined?

Jeanette Cunningham
 

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