• date stamping changes to records (’97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » date stamping changes to records (’97)

    Author
    Topic
    #368554

    I want to be able to track the date a record was last amended on a form (just that the record has been altered not necesarily identify a particular field) – but that people could still access and view records on the form without that triggering any date update.

    Can anyone help please?

    Thanks

    Roberta

    Roberta

    Viewing 0 reply threads
    Author
    Replies
    • #577879

      Add a Date/Time field to the table. Include the newly added field to the recorset query the form is bound to. Add a new txbox control on your form and set the Control Source of the txbox to the newly added field. You can set the “Visible” property to False to hide the control from view.

      Use the form’s “On Before Update” event to populate this new hidden txtbox.

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

      (change “YourControlName ” to the name of the hidden txtbox)

      The “Before Update” event of the form only fires if you are currently on a “New Record” or if an “Existing Record” is altered.

      HTH
      RDH

    Viewing 0 reply threads
    Reply To: date stamping changes to records (’97)

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

    Your information: