Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    time default (2000)

    Hi, I have a field say field1 that I require populating with the current time when the record has updated, how can I code this? I have tried the form update event with me.field1. time() but this changes all the records I have, Ineed each record to be unique.


    Thanks Darren.

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

    Re: time default (2000)

    Field1 must be a field in the record source of the form. Put code in the Before Update event of the form:

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    Me.Field1 = Now
    End Sub

    (Now is the current date and time, while Time is only the current time)

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: time default (2000)

    Thanks Hans.

    Darren.

Posting Permissions

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