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

Report to display certain fields if another field is null

Status
Not open for further replies.

qshaz

Technical User
Feb 1, 2002
17
0
0
AE
Hello

I am required to do this in my report:
There is a date that I am supposed to show in the report. In my table, I have two dates - one is end date, and the other is deposit end date. I want my report to show end date if end date is filled in, and if end date is blank or empty, then to whos deposit end date (the user who enters will only enter one of these).

I have no clue how to do this in the report! Can anyone help me please?
Thanks!
 
you can use the iif function for that. Just set a field's rowsource to an equal sign, followed by this function. Suppose the table that your report is based on has three fields: endDate, valueIfGiven and valueIfNotGiven. then you make a textbox on the report and set the rowsource to:
=iif(isNull([endDate]),[valueIfNotGiven],[valueIfGiven])

Do not forget the equal sign.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top