How to create an if statement in Access?

mtp

Registered User.
Local time
Today, 16:01
Joined
Dec 8, 2000
Messages
35
I want to print out a due date in my report, and the condition to print out is that: if the type is 1 or 0 then use the enddate else use the transdate. How do I create an if statement to tell the report to do this? Please help!!!
 
add a textbox to the report where you want the date to print, and enter this for the control source of the textbox:
IIf(type=0 or type=1, enddate, transdate)
 
I'm sorry Charityg that I didn't mention about the 30 days after.
If type is 0 or 1 then duedate is 30 days after enddate otherwise, duedate is 30 days after transdate.
Could I still use the control source to do it? or I have to use the update query?
 
=IIf(type=0 or type=1, enddate+30, transdate+30) Should work
 
Thanks Charityg! It's worked very well except for some balance is made up of multiple records and the duedate wants to see on the report would be the earliest duedate. Any more suggestion is very appreciate.
 

Users who are viewing this thread

Back
Top Bottom