I honestly do not know why this code is not working, but any ideas would be appreciated. The code should check if access is currently blocked, which it does fine. Then it should check if the current front end version is lower than the back end version, and if it is lower it should prompt that a new version be downloaded. The problem is no matter what the value of the front end version is, lower, equal, or higher, it always prompts to download a new version. On the opening form there are 2 text boxes, one with the current version of the front end which I enter, and one with the back-end version which uses a control source to the linked back-end database to pull the data. In Form View, both fields display 1.35, yet when opening it still prompts to download a new version.
Code:
If Me.BlockAccessCheck = True Then
Me.Visible = False
DoCmd.OpenForm "frmBlockAccess"
Forms!frmBlockAccess.SetFocus
End If
If Me.VersionTxt < Me.CurrentVersionTxt Then
VersionResponse = MsgBox("The database has been updated, please retrieve a new copy." & vbCrLf & "Would you like to retrieve a new copy of the database now?", vbYesNo, "Database Out of Date")
If VersionResponse = vbYes Then
objShell.Run ("website")
DoCmd.CloseDatabase
Else
'DoCmd.CloseDatabase
End If
End If