File Date Modifed property in textbox (1 Viewer)

megamef

Registered User.
Local time
Today, 09:25
Joined
Apr 18, 2013
Messages
161
Hi All,

I have a split database with a frontend that I semi-regularly update (when one of my users finds a bug I never would have thought for looking for). On my menu screen i have a text box that says: "Last Updated: ##/##/####".

At the moment I manually update the date every time I update the frontend.

Is there a way I can use the DateModifed property of the .mdb file for the frontend as the date in my textbox using VBA?

Cheers Steve.
 

pr2-eugin

Super Moderator
Local time
Today, 09:25
Joined
Nov 30, 2011
Messages
8,494
Why not create a log table? That would be far more easier than to create a meta object to read the information and assign it.
 

spikepl

Eledittingent Beliped
Local time
Today, 10:25
Joined
Nov 3, 2010
Messages
6,144
Also - check how the DateModified of the front end behaves. You might get a surprise.
 

megamef

Registered User.
Local time
Today, 09:25
Joined
Apr 18, 2013
Messages
161
Not familiar with log tables but just looked them up on google and if I've got the right idea it's something you call to make a log of the current date (which might be useful) but I only want to call it when I change the frontend.

I should have mentioned that the frontend is stored on a server but each user has a local copy on their PC.

The shortcut on their desktop is a .bat file which checks to see if the file on the server is newer than the one on their PC, if it is then it copies and overwrites their local file.

So the date modified only changes when I replace the server file with my own update file.
 

pr2-eugin

Super Moderator
Local time
Today, 09:25
Joined
Nov 30, 2011
Messages
8,494
When you release the "new" version just manually add a record in the log table. Then you just compare the date with the date the last time a copy was made to the local drive, if it matches well and good if not call your bat script to copy new version.
 

vbaInet

AWF VIP
Local time
Today, 09:25
Joined
Jan 22, 2010
Messages
26,374
I'm not following this thread, just my 2 pennies (worth more than 2 cents) ;)
On my menu screen i have a text box that says: "Last Updated: ##/##/####".

Is there a way I can use the DateModifed property of the .mdb file for the frontend as the date in my textbox using VBA?
To get the modified date you can use the FileSystemObject library:
Code:
fso.GetFile(CurrentProject.FullName).DateLastModified
... where fso is a FileSystemObject object.

With the table approach, a log table is simply a table, perhaps you're thinking that "log table" means something special. Your table should include at the very least, the username, date modified of the user's FE, date modified of the new FE, build and version number of the new FE. You could swap the date modified of the user's FE to the date modified of the new FE after successful replacement so that the modified date/time is consistent across all the users.
 

Users who are viewing this thread

Top Bottom