Has the data been altered? (1 Viewer)

John Sh

Member
Local time
Tomorrow, 06:10
Joined
Feb 8, 2021
Messages
410
I have a split database with multiple tables and multiple users.
Is there a way, other than date/time, to tell if any data has been altered.
The back end date/time can be stored in a tempvar but the time changes if the data is viewed and not necessarily changed.
The previous day's data is automatically backed up when the first user logs in on the next working day.
I would like to trigger another back up when the last user logs off, if the data has been altered and not just viewed.
I know it's a bit "belts and braces" but sure is better than sorry.
 

ebs17

Well-known member
Local time
Today, 22:10
Joined
Feb 7, 2020
Messages
1,946
It is useful to have two additional timestamp fields for created and updated in important tables, which are of course filled with Now in the affected records on these occasions.
Ideally, something like this happens at table level, because all accesses (bound form, action queries, recordset actions, standard imports, manual intervention?) are taken into account there.

This can be used to determine whether there have been any data changes compared to a given point in time.
 

June7

AWF VIP
Local time
Today, 12:10
Joined
Mar 9, 2014
Messages
5,473
Why not just back up regardless? Can it hurt?
 

John Sh

Member
Local time
Tomorrow, 06:10
Joined
Feb 8, 2021
Messages
410
It is useful to have two additional timestamp fields for created and updated in important tables, which are of course filled with Now in the affected records on these occasions.
Ideally, something like this happens at table level, because all accesses (bound form, action queries, recordset actions, standard imports, manual intervention?) are taken into account there.

This can be used to determine whether there have been any data changes compared to a given point in time.
Unfortunately the updated time is changed once the file is accessed, whether altered or not, so is of no value here.

June7.
You're right, of course, just do it.
 

ebs17

Well-known member
Local time
Today, 22:10
Joined
Feb 7, 2020
Messages
1,946
I was talking about timestamp entries in records in tables, not the properties of the backend file.
Of course, that means a little more work in understanding and doing.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:10
Joined
Feb 28, 2001
Messages
27,188
Is there a way, other than date/time, to tell if any data has been altered.

Of course there is, but you won't like the answer.

There is an old rule that applies to Access programming. Access only implements the basics of table care. But it gives you all sorts of possibilities if you want something to tell you that a change has occurred. You generally have to write the code for that yourself and devise a method of implementing, maintaining, and monitoring this facility you just created. If you want a specialty function, "roll your own."
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:10
Joined
Feb 19, 2013
Messages
16,616
Depends what you mean by data has changed - if talking about records then the only way would be data macros on each table to update a ‘backup required’ table field. If user can only access data via forms then possibly some code in the form beforeupdate event to update the table in the back end
 

Users who are viewing this thread

Top Bottom