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

return zero query

Status
Not open for further replies.

jamespeters01

IS-IT--Management
Apr 3, 2001
75
GB
I have a query with one of the criteria as below.

< [number of units ??]


I would like to offer the user the opoortunity to just hit return and all the records to be produced, but as it stands if the user hits return the query thinks of it as a zero and only produces records with a zero in it.


Any help would be appreciated
 
Assuming you know what a value which would always be more than the max value of number of units.

You could do something like..

<(IIf([number of units]=0,10000,[number of units]))

This will set number of units to 10000 (or whatever number you need to ensure all records are returned) if 0 is entered, otherwise [number of units] will be the value entered.

There are two ways to write error-free programs; only the third one works.
 
Sorry, if you just hit enter then null is returned so should be...

<(IIf(IsNull([Enter Number]),10000,[Enter Number]))

There are two ways to write error-free programs; only the third one works.
 
You should be able to write it like this
<[Number of Units] or [Number of Units] Is Null

That should do what you want.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top