Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query resulting in null

Status
Not open for further replies.

medic133

Technical User
Apr 7, 2002
86
US
I'm combining several queries that refer to option boxes on a form. The query is concerning the count of values from these option boxes. When I enter a value of an option box in the criteria of a query and the underlying table does not contain that value, I receive no results when the query is run. (In other words, if the table has "1" as a value in all rows, and I specify "2" in the criteria of the query, the result is nothing but the column headings of the query.) What I need is for the query to return a value of "0" as the count so that I can use this in a report. I think this concerns null values and have played with the Nz function in the query but either don't understand what to put for the variant (or don't understand variant) or the Nz function doesn't belong in a query or this doesn't have anything to do with nulls. I tried looking at the SQL for the query but ran away as it's Greek to me. Is there a solution to this problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top