FE Update - More Help Please

D

DDBeards

This is a repost for more help. History: I have the master data(be) and the
master user interface (FE) on a server. Our employees copy the FE to their
desktop to run. Based on previous feedback I have created a batch file that
copies the master FE to the local pc when there is a newer version available.
Here is the problem I have run into; the shell command that runs the batch
file works great, however I can not exit the current FE that calls the shell
and restart the new version because of how long it takes to copy the file and
how long it takes to close FE (compact on close etc...). I have looked at
Tony Toews utility and although it would work great, the company will not let
me use it due to Corp Security here. My work around was to create a second
small FE that does nothing but looks at the version numbers of both the local
and master and kick off the current FE or copy the new FE and then kick it
off. But I can not get the call to start the new FE to work. How do I start
another mdb from inside an mdb? Please help

Chris
 
D

Douglas J. Steele

Instead of calling the .BAT file from Access, create a shortcut that
determines whether or not it's nececssary to copy the file, then launches
the application on the user's desktop. You can call cscript to run VBScript
to compare the properties from your .BAT file.
 
D

DDBeards

I like the concept, but have no idea how to do that in a bat file. How would
I write something like:

If master.version <> local.version then copy.bat

Where Master and local are the mdbs and version is a field in each?
 
T

Tony Toews [MVP]

DDBeards said:
I have looked at
Tony Toews utility and although it would work great, the company will not let
me use it due to Corp Security here.

FWIW Boeing now officially allows their folks to use the Auto FE
Updater.

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/
 
D

Douglas J. Steele

I think you`ll need to use VBScript. Something like the following untested
air-code:

Dim appAccess
Dim objFSO
Dim strLocalCopy
Dim strServerCopy
Dim strLocalVersion
Dim strServerVersion

strLocalCopy = "C:\Folder\File.mdb"
strServerCopy = " \\server\share\folder\file.mdb "
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase strLocalCopy
strLocalVersion = appAccess.Properties("Version")
appAccess.CloseCurrentDatabase
appAccess.OpenCurrentDatabase strServerCopy
strServerVersion = appAccess.Properties("Version")
appAccess.CloseCurrentDatabase
Set appAccess = Nothing
If strLocalVersion <> strServerVersion Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strServerCopy, "C:\Folder\", True
Set objFSO = Nothing
End If

If you save that to a file (say C:\Folder\Script.vbs), you can run it from a
batch file using

cscript "C:\Folder\Script.vbs" //nologo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top