Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Posts
    48

    Question Unanswered: Help please! After Update

    I have a form with the fields StartDate and EndDate and the buttons preview report and cancel. I want to create an after update event so when the user enters the start date, the end date is automatically generated as one month after the start date. And the report will be based on the month period entered. Also, the user should be able to change the end date is he so wants, and thus the report will use these dates to generate the report.

    Help please,

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I think this will do it:

    Code:
    Private Sub StartDate_AfterUpdate()
    
         Me.EndDate.Value = DateAdd("m", 1, Me.StartDate)
    
    End Sub
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Sorry! Meant to add that the user can still edit the EndDate if desired!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Jun 2006
    Posts
    48
    Thank you, dear. I got it to work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •