Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Scotland, UK
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Writing to date updated field when record changes

    I need to write today's date to a date updated field in an Access 2000 database whenever any data in any field in the record changes. I can do this with a module level function that I call from the AfterUpdate event of each control on the form but only did this because I couldn't find an appropriate form level event or other mechanism that would let me do this in one place. I went through the false dawn of using the Form's AfterUpdate event, which if course gets fired every time I write to the date updated field and so locks me into a permanent loop. There must be an easier way than calling a function from every control on the form that can change. Is there?

  2. #2
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Writing to date updated field when record changes

    I use the before update event.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Writing to date updated field when record changes

    In the form's before update event I use the following code to update my DateStamp field:

    If Me.Dirty Then
    Forms![MyFormName]![MyDateStampFieldName]=Date
    End If
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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