Help with launcher code

Jon123

Registered User.
Local time
Today, 18:05
Joined
Aug 29, 2003
Messages
668
I have this launcher run that is supposed to compare the version of the FE on a user's pc and compare it to the version on the server. If different then an auto update should happen. However, I can't seem to get this to work. Any ideas please help


Public Function VersionCheck()
Dim strFE_Version As String
Dim strCurrent_Version As String
Dim Temp As Long
Dim Test As String
Dim strSourceFile As String
Dim strDestinationFile As String
strSourceFile = "M:\PassdownXP\Passdown.mde"
strDestinationFile = "C:\Passdown\Passdown.mde"
strFE_Version = DLookup("[value]", "tblLocalVariables", "[name] = 'version'")
strCurrent_Version = DLookup("[value]", "tblCurrentVersion", "[name] = 'version'")
If strFE_Version <> strCurrent_Version Then
MsgBox ("Your Passdown Program needs to be upgraded. Click OK to perform upgrade." & vbCrLf & "Please note this this upgrade may take a few minutes.")
FileCopy strSourceFile, strDestinationFile
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblCurrentVersion SET [value] = '" & strFE_Version & "' WHERE [name] = 'Version'"
MsgBox ("Your database has just been updated.")
End If
Test = """C:\Program Files\Microsoft Office\office11\Msaccess.exe""" & " " & """C:\Passdown\Passdown.mde"""
Temp = Shell(Test, vbMaximizedFocus)
End Function
 

Users who are viewing this thread

Back
Top Bottom