I'm having problems with the 2105 Can't go to the specified record in my error handler. I added the MsgBox Err.Description to find out what the problem was that wouldn't let me save and go to the new record. All information is filled in and the error doesn't occur for every record. Anyone have any ideas?
If Me.txtTotaledScrap <> Me.txtScrap Then
MsgBox "Totals aren't equal to Scrap pieces, please check quantities"
Else
On Error GoTo ErrorHandler
Dim strMsg As String, strTitle As String
strMsg = "Do You Want To Save This Record?"
strTitle = " Save Record ?"
If MsgBox(strMsg, vbQuestion + vbYesNo, strTitle) = vbNo Then
Me.Undo
ExitErrorHandler:
Exit Sub
ErrorHandler:
MsgBox Err.Description
MsgBox "Please make sure all information is entered"
Resume ExitErrorHandler
End If
DoCmd.GoToRecord , , acNewRec
End If
'Bunch of visibility controls right here
End Sub
If Me.txtTotaledScrap <> Me.txtScrap Then
MsgBox "Totals aren't equal to Scrap pieces, please check quantities"
Else
On Error GoTo ErrorHandler
Dim strMsg As String, strTitle As String
strMsg = "Do You Want To Save This Record?"
strTitle = " Save Record ?"
If MsgBox(strMsg, vbQuestion + vbYesNo, strTitle) = vbNo Then
Me.Undo
ExitErrorHandler:
Exit Sub
ErrorHandler:
MsgBox Err.Description
MsgBox "Please make sure all information is entered"
Resume ExitErrorHandler
End If
DoCmd.GoToRecord , , acNewRec
End If
'Bunch of visibility controls right here
End Sub