Update Mdb on the Fly (Forms, Reports, etc.)

  • Thread starter Thread starter DDBeards
  • Start date Start date
D

DDBeards

I have large access program that resides on our server. The data in a
Master_be.mdb file is on the departments server for all to use. The access
program (Local.mdb) that uses this data is installed on server as well, but
the users are instructed to copy the Local.mdb to their desktop when ever a
change is made to a form or report. There is a version number in both the
Local and the Master_be and if these do not match, the user is instructed to
download the latest version of Local to their desktop. What I would like to
have happen is that if the version numbers do not match, the latest forms and
reports are copied from the server to the desktop program automatically for
the user. Any ideas would help and thank you in advance.

Chris
 
Yes, there is a very simple way to do this.
First create a batch file that copies the front end mdb from the server
location to the local user's computer in the correct folder, then starts the
application. Here is an example I did for some testing:

Copy "T:\Tricks\Tricks.mdb" "C:\Development\"
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"C:\Development\Tricks.mdb"

Now, in your code, when you have determined the version numbers don't match,
all you need to do is shell to the batch file, and quit the applicaiton.

If LocalVersion < ServerVersion Then
Shell("M:\ApplicationFolder\UpdateVersion.Bat")
Docmd.Quit
End If
 
DDBeards said:
I have large access program that resides on our server. The data in a
Master_be.mdb file is on the departments server for all to use. The access
program (Local.mdb) that uses this data is installed on server as well, but
the users are instructed to copy the Local.mdb to their desktop when ever a
change is made to a form or report. There is a version number in both the
Local and the Master_be and if these do not match, the user is instructed to
download the latest version of Local to their desktop. What I would like to
have happen is that if the version numbers do not match, the latest forms and
reports are copied from the server to the desktop program automatically for
the user.

I would strongly suggest copying down the entire FE to the client PC.
Don't even think about coping down forms and reports. For example
what if a new linked table is added? You don't mention queries or
modules either.

Of course I'm biased but I feel that Doug made an excellent
suggestion. <smile>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
The batch file works great. The code that calls the batch file from access
works great. The problem I am having however is that the batch file launches
the copy before the calling db has shut down and this creates a conflict. Is
there any way to delay a batch file for 10 seconds?

Chris
 
Back
Top