Linking queries.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 4 table that I have linked in 2 different queries. I then created a
3rd query to link the 1st two queries by serial number. I then created a
report off of the 3rd query to display the serial numbers from one table and
the serial numbers from the second table. The problem I am having is that I
want the serial numbers linked so that all the way down the page the match,
but if one table does not have the serial number it is not added to the
report. I want the report to show all the serial numbers from both tables
even if one table does not have a serial number the other table has. In a
case like this it can display the serial number and in the user name field it
should return a blank field. How can I do this. When I link it in the query
it only gives me the option to link the same from both tables, or the serial
numbers from one table or the other.
 
You have a couple of choices: If you have a table which includes all serial
numbers, then you can add that to your third query, use that table for your
serial number field on the report and link to the other two queries with an
outer join. Another option, if the fields in the tables are similar, is to
create a temporary table in which you append the records from the first two
queries into the same table and run the report off that table instead of the
third query. That option would depend on if the first two queries need to be
linked or just need the data.

Hope this helps.
 
Thank you very much. That was very helpful.

Jackie L said:
You have a couple of choices: If you have a table which includes all serial
numbers, then you can add that to your third query, use that table for your
serial number field on the report and link to the other two queries with an
outer join. Another option, if the fields in the tables are similar, is to
create a temporary table in which you append the records from the first two
queries into the same table and run the report off that table instead of the
third query. That option would depend on if the first two queries need to be
linked or just need the data.

Hope this helps.
 
Back
Top