Mar 10 2009, 08:10 PM
I have a maintenance form where users will key in a primary ID to retrieve a record for updating.
Can the system know if the records has been "touched" - means updated before? As i would like to force my users to save the record if any of the fields on the form has been updated.
This is because:
Currently, my system is encountering problems where the records inputted by the users gone missing after a few days in the database and i have no idea why this happens. Any one knows about this problem? How can i prevent that?
Mar 10 2009, 08:24 PM
Unless you take extra steps, any record that is changed in access through a form is saved.
Mar 10 2009, 10:43 PM
You can test the me.Dirty value. If true then you need to save the record.
Test it using this logic
If Me.Dirty Then
<do something here>
You don't really have to test it as long as you know if the user is closing the form or leaving the current record. Just put this in your exit code:
Me.Dirty = False
That forces a Save.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here