View Full Version : Need help with date, newbie


PuJo
10-12-2006, 12:12 PM
Great forum, lots of smarts here.
I want to add 90 days to a date field, and have the new date in another field.

This is what I have on the form.

(feild 1) Previous PM Date (man. entered date)
(Feild 2) Next PM Date (I want this to auto update when a date is entered in (field 1)

I hope you understand what I am trying to say.

Thanks in advance,
PuJo

FoFa
10-12-2006, 12:25 PM
On whatever event you wish to use (like after update) run this.
Me.NextPMdate = DateAdd("d",90,Me.PreviousPMdate)

of course make sure you use your names

PuJo
10-12-2006, 12:51 PM
OK,
What am I missing?
Doesn't work, and what do you mean about "make sure you use your names"?
I hope I don't sound too stupid.
But thanks for the quick reply.
Pujo

"On The Bayou"

FoFa
10-12-2006, 02:13 PM
Me.NextPMdate = DateAdd("d",90,Me.PreviousPMdate)
The Me.NextPMdate (you need to substatue) your control name
Same with PreviousePMdate, I don't know what your control names are.
This would be in a event procedure.
If you want to use a macro, you have to use SETVALUE instead