I use a Visual Basic 6 program that runs as a short cut on the client's desktop. They click it and get the latest update copied to their computer and opens the database. The first thing you need to do in VB is create a reference to Microsoft Scripting Runtime. Then run this code, create an executable and create a short cut on the client's desktop of the executable. The code is commented to show what's going on. I also add a label on the form to show that a file was copied.
Const Network As String = "E:\AccessDB\Foreclosure.mde"
Const Client As String = "D:\AccessDB\Foreclosure1.mde"
Dim fso As FileSystemObject
Private Sub Form_Load()
'Instantiate file scripting object
Set fso = New FileSystemObject
'Copy file to client if no file exists on client
If fso.FileExists(Client) = False Then
fso.CopyFile Network, Client
Label1 = Client & " new file copied to client folder."
'Copy file latest update to client if file exists
'and date last modified on network is greater than client
ElseIf fso.GetFile(Network).DateLastModified > _
fso.GetFile(Client).DateLastAccessed Then
fso.CopyFile Network, Client, True
Label1 = Client & " new update copied to client folder."
End If
'Dereference file scripting object
Set fso = Nothing
'Open access front end with maximized focus
Shell "D:\Program Files\MicrosoftOffice\Office\MSAccess.exe D:\AccessDB\Foreclosure1.mde", vbMaximizedFocus
'End program
End
End Sub
Const Network As String = "E:\AccessDB\Foreclosure.mde"
Const Client As String = "D:\AccessDB\Foreclosure1.mde"
Dim fso As FileSystemObject
Private Sub Form_Load()
'Instantiate file scripting object
Set fso = New FileSystemObject
'Copy file to client if no file exists on client
If fso.FileExists(Client) = False Then
fso.CopyFile Network, Client
Label1 = Client & " new file copied to client folder."
'Copy file latest update to client if file exists
'and date last modified on network is greater than client
ElseIf fso.GetFile(Network).DateLastModified > _
fso.GetFile(Client).DateLastAccessed Then
fso.CopyFile Network, Client, True
Label1 = Client & " new update copied to client folder."
End If
'Dereference file scripting object
Set fso = Nothing
'Open access front end with maximized focus
Shell "D:\Program Files\MicrosoftOffice\Office\MSAccess.exe D:\AccessDB\Foreclosure1.mde", vbMaximizedFocus
'End program
End
End Sub