Hi All
I have an existing database that I am working on, currently I have a bandaid solution while I work on a complete rewrite for Azure.
Currently upon opening it simply pulls all table data from Azure SQL into the local tables (to increase performance).
There will be 1 maybe 2 admin users who actually update the data, all other users just "look" at the data.
To save upload/download time, I'm thinking of adding a "LastModified" date/time field to the tables, my question is how to add the date / time in VBA as below:
1. Add date/time when a new record is added to local table "LastModified" field
2. Change a date/time when a record is edited (the changes are done via VBA code, and very rarely via a datasheet view form)
Second part would be code that can run at database opening that:
1. Compares all local tables records with Azure SQL tables records (would be identical) and only downloads to the local tables records that have different "LastModified" date/times to what is already in the local tables
2. Code that only downloads from Azure SQL tables the new records that are not already in the local tables (again the tables are identical).
3. The opposite of the above 1/2, only upload from local tables to Azure SQL tables the changed and new records (based on "LastModified" date/time). Run this code on upload command (handled by VBA).
Any ideas, hopefully this is a rather easy code as I'm sure something like this is required all the time.
Cheers