Creating a query with fields from multiple tables

unclefink

Registered User.
Local time
Yesterday, 16:33
Joined
May 7, 2012
Messages
184
I am trying to create a query which contains fields from multiple tables. I've managed to create the query as I have with any other query i've built; however when I add the field from a secondary table, when I run the query, the results comes back missing a good majority of data. Can anyone help me with this, what am I doing wrong. What do I need to do to fix the problem. My end result intention is to build a report to show this specific data.

Thank you anyone in advance.

David
 
Can you give us more background? How are the tables related? And what sort of end result are you looking for?
 
When you create a query on tables that are related by an INNER JOIN, and the child table has no records for a particular parent, then that parent record will also not appear in the query. This may be the cause of the effect that you've described.
If so, to get all parent records to appear you need to use a LEFT or RIGHT JOIN. In the query design grid you can right click on the line representing the join between tables, select the 'Join Properties' option, and in the following dialog, select the table for which you would like all records to appear.
Hope that helps,
Mark
 
I was looking into this a bit further waiting for a response and started playing with the individual query relationship, a little bit of this and a little bit of that then tadaa, it works.

Just shortly after finding the result I was looking for, I received a notification on my smart phone that I had a new email. I check my email and found the new email to be a notification indicating I had responses to my question, upon further reading, I found that what I had done was what lagbolt suggested changing.

Being a newer user of Access and not understanding something one minute, a light bulb has suddenly come up several times over the period of building and now maintaining this database. It's like my brain is learning while i'm not even working on the database.

Thank you everyone for your responses regarding this subject matter, I greatly appreciate it.
 
This is awesome...
It's like my brain is learning while i'm not even working on the database.
I know what you mean, and I love when I get that. :)
Mark
 
a light bulb has suddenly come up several times over the period of building and now maintaining this database. It's like my brain is learning while i'm not even working on the database.

It is always a great feeling to figure something out for yourself and doubly so when someone with a good or better knowledge comes up with the same answer.
Good for you unclefink and well done lagbolt
 

Users who are viewing this thread

Back
Top Bottom