Joined queries and no records problem (1 Viewer)

olxx

Registered User.
Local time
Today, 07:55
Joined
Oct 2, 2009
Messages
36
I have two queries that collect and join data from different tables. Lets call them qry1 and qry2.Those two queries have no criteria and always return data.
Now I have a third query based on that two queries that joins these two queries for a report. Report is launched from a form where user adds criteria. Now there is a problem when this criteria is not met in one of the queries (qry1 or qry2) and then the third query returns no records and report shows no records. But I want the the report to show records from one query that has values and show "no records found" and "0" for numeric fields (those zeros are most important, because report calculates some fields based on that) from second query.
Both queries contain multiple fields and it is not possible to collect data from all tables with one query. Is there a solution for this problem or it is just a bad db design?
 

Mr. B

"Doctor Access"
Local time
Today, 09:55
Joined
May 20, 2009
Messages
1,932
Check the type of "join" you are using to connect the tables. You will find that you need to set the join to allow all records from you first two tables and only records from the third table or the other way around. You would know which way would be correct for you specific situation.
 

Users who are viewing this thread

Top Bottom