• Quick AutoUpdate Code (ACCESS 2K SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Quick AutoUpdate Code (ACCESS 2K SR-1)

    Author
    Topic
    #388756

    I need a quick code to place ‘today’s date’ in a date field when a person finishes updating a record.

    Viewing 0 reply threads
    Author
    Replies
    • #683890

      You can use the BeforeUpdate event of the form to do this:

      Private Sub Form_BeforeUpdate(Cancel As Integer)
      Me.[LastUpdated] = Date
      End Sub

      Replace LastUpdated by the name of your date field.

      Note: if you just want to place today’s date in a field interactively, press Ctrl+; (semicolon.)

    Viewing 0 reply threads
    Reply To: Quick AutoUpdate Code (ACCESS 2K SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: