Set a Default for rows with no matches

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

Guest

I have a table and a query that I have a join where all rows from table 1
should be displayed and any matching info on query should be shown. If no
matching values are found on query 1 I want the default value to show 0.

ex.
Table 1
cust 1
cust 2
cust 3

query 1
cust 1 cost 20
cust 3 cost 30

I get back...
cust 1 cost 20
cust 2 cost null
cust 3 cost 30

I would like to see...
cust 1 cost 20
cust 2 cost 0
cust 3 cost 30

Thanks for the help
 
Use Nz() function to convert Null to zero.

Check Access VB Help on the Nz() function.
 
Back
Top