i have a very simple unbound form with 2 unbound controls
the only code behind it is below(On Open) (and a 2nd event On Timer...)
yet when the form opens, it executes the code and then responds with a "0" error (and no description)
am i missing something?
maybe i simply need to have an "exit sub" immediately before "on Error"?
(could it be that simple?)
as always, with thanks in advance,
m.
Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
' Set Count Down variable to false
' on the initial opening of the form.
strMDb_shutdown_Folder = DLookup("[MDb_shutdown_Folder]", "tblMDb_Shutdown")
strMDb_shutdown_FileName = strMDb_shutdown_Folder & "/" & DLookup("[MDb_shutdown_Filename]", "tblMDb_Shutdown")
' MsgBox (strMDb_shutdown_Folder & vbCrLf & strMDb_shutdown_FileName)
blnCountDown = False
Me.txtSetFocus.SetFocus
Err_Form_Open:
If Err.Number = 3044 Then
gsMsgText = "The MDb file needs to be relinked...."
gsMsgTitle = "MDb LINK ERROR"
gsMsgResponse = MsgBox(gsMsgText, vbExclamation + vbOKOnly, gsMsgTitle)
Else
MsgBox Err.Number & " - " & Err.Description
End If
End Sub