Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form afterupdate event (2003)

    I want to put a simple DateTimestamp on a record.

    My question is, is there a single afterupdate event for an entire record, or should I attach code to each field's AfterUpdate event. (e.g. Me.DateStamp = Date() ).

    I notice that the form itself has an AfterUpdate event. When exactly does this fire?


    Thanks in Advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: form afterupdate event (2003)

    This doesn't seem to be a Windows XP question. What application are you talking about?

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: form afterupdate event (2003)

    Oops I meant to post in Accvss.

    My mistake.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: form afterupdate event (2003)

    I have moved your thread to the Access forum.

    If you want a timestamp for the record as a whole, you should use the Before Update event of the form:

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    Me.TimeStamp = Date
    End Sub

    (I would use Now instead of Date, since Now also includes the time). You shouldn't use the After Update event of the form to modify the record, for that would cause an endless loop. You would use the form's After Update event for example if you want to update (a control on) another form when the record in the current form has been modified.

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: form afterupdate event (2003)

    Thank you Hans, for all your help and advice on this.

    I think this will work just fine.

Posting Permissions

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