Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove/add dates in a form by entering other dates 1

Status
Not open for further replies.

mobile2

Programmer
Dec 19, 2002
38
GB
I have a form with 4 date fields. The fields are updated in the following order "Active Date", "First Contact", "Last Contact", "Next Contact". I have already used a useful piece of advice for entering a "First Contact" date 7 days after the "Active Date" (thread705-441796). I would now like to remove the "First Contact" date once a "Last Contact" date is entered and then add a "Next Contact" date that will be 3 months after the "Last Contact". The "Next Contact" date may not always be 3 months after the "Last Contact" and would have to be amendable. These dates will activate different reports.
 
In the Last Contact "After Update" event:

me![First Contact] = Null
me![Next Contact] = DateAdd("m", 3, me![First Contact])

Hopefully, should do it.
 
That's twice I've done this today. I think it's correct this time!

In the Last Contact "After Update" event:

me![First Contact] = Null
me![Next Contact] = DateAdd("m", 3, me![Last Contact])

Hopefully, should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top