Dick7Access
Dick S
- Local time
- Today, 17:45
- Joined
- Jun 9, 2009
- Messages
- 4,325
The following code works fine until it gets to last record, then it give me Error # 94 Invalid use of null. I have searched all of my code and null is not in the code.
Code:
'--------------------------------------------------------
' Goes to next record
'---------------------------------------------------------
Private Sub cmdNext_Click()
On Error GoTo err_handler
' DoCmd.GoToControl (txtNameL)
' DoCmd.GoToRecord , , acNext
DoCmd.GoToRecord acForm, "frmMain", acNext
DoCmd.GoToControl "txtNameL"
Call CombFandS 'combines husband and wife over picture
cmdNext_Exit:
Exit Sub
err_handler:
If Err.Number = 2105 Then
MsgBox "You have already reached the Last person.", vbApplicationModal, "Remember God does Knee Mail"
Else
MsgBox Err.Description, vbExclamation, "Error #: " & Err.Number
End If
Resume cmdNext_Exit
End Sub