I have a split app (BE on server - separate FE on each workstation)
which is being upgraded with various whistles and bells. To upgrade
the FE's I email a small database with an instruction to launch
(rather than detach) it.
This database has an autoexec macro which runs code.
The code is as follows:-
(where fOSUsername is the logon name for Windows NT, code from
http://www.mvps.org/access/api/api0008.htm courtesy Dev Ashish)
Function copynewapp()
Dim Sourcefile, DestinationFile
Call killold
Call fOSUserName
Sourcefile = "H:\Bus Support\TaskTracker.mdb" ' Defines sourcefile
name.
DestinationFile = "C:\WINNT\Profiles\" & fOSUserName & "\Desktop\Task
Tracker.mdb" ' Define targetfile name.
FileCopy Sourcefile, DestinationFile ' Copy source to target.
End Function
Function killold()
On Error GoTo Err_killold
Contains various Kill statements to delete a number of possible
files
including shortcuts relating to app.
Exit_killold:
Exit Function
Err_killold:
Resume Next
End Function
Function fOSUserName()
code from http://www.mvps.org/access/api/api0008.htm courtesy Dev
Ashish
End Function
There is also functionality to prevent database being opened if FE
version is not correct.
Your thoughts and comments are appreciated.