I have a back-end located on a server at z:\database\be.accdb (for example) and users copy the latest version of the front-end to a random location on their local drive.
The latest version of the front-end is stored on the server at z:\database\front\fe.accdb and historically users were asked by e-mail to update their copy when necessary.
I recently added a check for updates by putting a version number in tables on both the front-end and back-end:
This made the database load if the version was correct or ask the user to manually update but I now want to take it a step further.
How can I change the second if statement so that it detects where the front-end resides, closes the database, copies the latest version from z:\database\front\fe.accdb, overwrites the original in the local place and starts the database?
Any help would be greatly appreciated.
The latest version of the front-end is stored on the server at z:\database\front\fe.accdb and historically users were asked by e-mail to update their copy when necessary.
I recently added a check for updates by putting a version number in tables on both the front-end and back-end:
Code:
Public Function VersionIs()
'Version check on start-up
If (DSum("VNo", "tblVersFE") = DSum("VNo", "tblVersBE")) Then DoCmd.OpenForm "Welcome"
If (DSum("VNo", "tblVersFE") <> DSum("VNo", "tblVersBE")) Then MsgBox "Please Install New Version" & vbCrLf & "Current Version Out of Date", , "Warning"
End Function
This made the database load if the version was correct or ask the user to manually update but I now want to take it a step further.
How can I change the second if statement so that it detects where the front-end resides, closes the database, copies the latest version from z:\database\front\fe.accdb, overwrites the original in the local place and starts the database?
Any help would be greatly appreciated.