Calculate a date (from start date) when check Box is activated

O

Oliver

Hi,
I have the follwing table
1. StartDate ( date Format)
2. Inc1Mo (checkBox)
3. SampleReadyOn (date Format)
I would like to program the following into a Form:
When the CheckBox is activated ( to yes) than:
1 month is add to the startDate and the new date is given into the
SampleReadyOn column.

For eg. if the Start date is 051708
When CheckBox is activated to " YES"
Than the following date shoud appears into SampleReadyOn = 061708 (Start
date + 1 month)
And I would like to have the same possibility for 3,6,12,24 months

Thanks for your help
Oliver
 
A

Al Campagna

Oliver,
Use the DateAdd function in the AfterUpdate event of Inc1Mo.
Private Sub Inc1Mo_AfterUpdate()
If Inc1Mo = True Then
SampleReadyOn = DateAdd("m", 1, StartDate)
End if
End Sub
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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