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

Using the IIF function to replace data

Status
Not open for further replies.

christak

MIS
Jul 14, 2003
20
US
Hi,
I'm not quite sure if the iif function is even the appropriate function to be using here, so please let me explain.

I have a parameter query set so that you type in a report date, and the query will show all production for that particular date. However, it make take an operator 2 days to finish one set of orders, so I need to know just the quantity that they made on the given date. Basically, if the prodate > [Type the report date], then quantity=0, if not, then use the quantity. Is this enough information to tell me exactly how I should be typing this if statement. I always get some sort of error, no matter what I do.
Thanks!
 
Set up a calculated field in your query:

DateQty: Iif (ProDate > [Type The Report Date], 0, quantity)

This will set up a field called DateQty with 0 or the quantity field.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top