DateAdd problem

G

Guest

I have created a button that sets the date in a text field 2 years from
another date text field using the setvalue macro. Problem is I want the date
to be 2 years minus one day not 2 years exactly.
DateAdd("m",24,[Forms]![Form Licence Application]![Valid From])

How do I subtract the day?
 
A

Ardus Petus

Just substract 1:
DateAdd("m",24,[Forms]![Form Licence Application]![Valid From]) - 1

HTH
 

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

Similar Threads

Case Select not working in 2007 14
DateAdd 14
how to add date if 1
Conditional Formatting a Date 2
Changing Time using a macro 1
DateAdd 5
Help with code. 4
DateAdd and DateSerial problem with months and days 2

Top