View Full Version : Automatically filling in a date


JWC
11-26-2001, 11:50 AM
I am creating a data entry form and I am having a little trouble. I need to know how to have access automatically enter the date in a field that is 30 days from the current date. For example, if I enter information into the form November 1, 2001 a reply will be due back within 30 days. I want access to automatically fill in the "Due Date" field with November 31, 2001. Any help I receive with this problem will be greatly appreciated.

Travis
11-26-2001, 12:29 PM
AfterUpdate Event of the Original Date field (the one that gets November 1, 2001)

Private Sub DateField_AfterUpdate()
Me.[Due Date]= DateAdd("d",30,cDate(Me.[DateField]))
End Sub