code to split (and reconnect) an Access database (part 2)

rhenerlau 0 Tallied Votes 166 Views Share

Place the file with part one of the code on the server. This part of the code gets placed in a batch file (text file with the extension *.BAT) and placed on each client's machine. Again, you will need to change the paths used to the real paths on your network. This will get a fresh copy of the front end each time the database is launched in this method - all revisions saved to the MDE file on the server will be reflected the next time a user launches the file in this method.

General formula:

Echo off
Echo Copying Database
copy "Source Path" "Destination Path"
start "Access Path" "Destination Path (from above)"

=======================
a real example:

Echo off
Echo Copying Database
copy "G:\Richard's Work\License Keys Front End.MDE" "c:\Documents and Settings\Family.Avalon2\My Documents\Richard's Work\License Keys Front End.MDE"
start "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "c:\Documents and Settings\Family.Avalon2\My Documents\Richard's Work\License Keys Front End.MDE"
=====================================================