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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Query

Status
Not open for further replies.

Bell1991

Programmer
Joined
Aug 20, 2003
Messages
386
Location
US
I have the following where clause:

Where
(( Forms!TestPage!numTotalMin is null or numTotal <= Forms!TestPage!numTotalMin) and (Forms!TestPage!numTotalMax is null or numTotal <= Forms!TestPage!numTotalMax ) )

This is returning all values in that range and null values? Is there a way to just return the values in the valid range (no nulls)??

Thanks
 
Just take out the check for nulls if you don't want nulls.
 
WHERE numTotal Between Nz(Forms!TestPage!numTotalMin, numTotal) And Nz(Forms!TestPage!numTotalMax, numTotal)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top