O
oxicottin via AccessMonster.com
Im trying to trap error 2450 and it keeps giving me a Compile Error: Label
not defined and highlighting the row (On Error GoTo ErrHandler) What am I
doing wrong? Thanks!
Private Sub Form_Timer()
On Error GoTo ErrHandler
Dim Response As Boolean
'//This is so when the app is maximized or minimized the app will open to
what was open or on top.
Response = IsAccessMaximized()
If Response And Me.txtAppMode = "Min" Then
Select Case Me.txtFormName
Case "frmUpdateEmployees"
Forms!FrmUpdateEmployees.SetFocus
Case "frm_LBStoMLFConversion"
Forms!frm_LBStoMLFConversion.SetFocus
Case "frm_ReportsSwitchboard"
Forms!frm_ReportsSwitchboard.SetFocus
Case "frmMaindB"
Forms!frmMaindB.SetFocus
End Select
Me.txtAppMode = "Max"
End If
'//This is how clock is viewed hours minutes AM/PM
Me!lblClockMain.Caption = Format(Now, "h:mm AMPM")
Exit Sub
ErrHandler:
If Err = 2450 Then
Me.txtFormName = "Background"
Forms!Background.SetFocus
Exit Sub
End If
MsgBox ("Error - " & Err.Description)
End Sub
not defined and highlighting the row (On Error GoTo ErrHandler) What am I
doing wrong? Thanks!
Private Sub Form_Timer()
On Error GoTo ErrHandler
Dim Response As Boolean
'//This is so when the app is maximized or minimized the app will open to
what was open or on top.
Response = IsAccessMaximized()
If Response And Me.txtAppMode = "Min" Then
Select Case Me.txtFormName
Case "frmUpdateEmployees"
Forms!FrmUpdateEmployees.SetFocus
Case "frm_LBStoMLFConversion"
Forms!frm_LBStoMLFConversion.SetFocus
Case "frm_ReportsSwitchboard"
Forms!frm_ReportsSwitchboard.SetFocus
Case "frmMaindB"
Forms!frmMaindB.SetFocus
End Select
Me.txtAppMode = "Max"
End If
'//This is how clock is viewed hours minutes AM/PM
Me!lblClockMain.Caption = Format(Now, "h:mm AMPM")
Exit Sub
ErrHandler:
If Err = 2450 Then
Me.txtFormName = "Background"
Forms!Background.SetFocus
Exit Sub
End If
MsgBox ("Error - " & Err.Description)
End Sub