Combining query results

TT13

New member
Local time
Today, 07:42
Joined
Nov 21, 2003
Messages
6
Hello, I have 3 simple selection queries that return records with a currency amount. I need to combine the currency amounts into one text box on a form.

If I use text box contol source

=DSum ((DSum[queX],[currency amount])+(DSum[queY],[currency amount)+([queZ],[currency amount]))

to combine them, if ever one of the three queries does not return a record I get a null value for the currency. As a result the other two queries with a currency value are ignored and my text box is blank. As long as I get records in each all is fine.

Is there a better way to combine these three queries to avoid the null value.

THANK YOU SO MUCH!
 
=Nz(DSum(field, query1)) + Nz(DSum(field, query2)) + Nz(DSum(field, query3))
 
Out of interest, would a UNION query to bring all three of these queries into one be of any help?
 
THANK YOU! Both solutions work but the Nz was the quickest to repair the form with. You saved me!! Can't thank you enough!!
 

Users who are viewing this thread

Back
Top Bottom