If Statement

C

cs1954

I have a query that projects the next months date "NextMonthDate:
DateAdd("m",1,[Date]). I need to change the date of the projection for the
month of April on here is what I am proposing

IF [Date] <4/16/06 [Then] NextMonthDate: DateAdd("m",1,[Date]
[ElseIf .4/15/06 [Then] NextMonthDate: DateAdd ("m",1, "d", 4, [Date]
[ElseIf >5/20/06 [Then] NextMonthDate: DateAdd("m",1,[Date]
 
C

cs1954

Thanks will give it a try

Jeff Boyce said:
Also, if you are working in a query, you'd be using the IIF() function
rather than an "IF" function.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


cs1954 said:
I have a query that projects the next months date "NextMonthDate:
DateAdd("m",1,[Date]). I need to change the date of the projection for the
month of April on here is what I am proposing

IF [Date] <4/16/06 [Then] NextMonthDate: DateAdd("m",1,[Date]
[ElseIf .4/15/06 [Then] NextMonthDate: DateAdd ("m",1, "d", 4, [Date]
[ElseIf >5/20/06 [Then] NextMonthDate: DateAdd("m",1,[Date]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top