belovedcej
Programmer
The following code is activated when a user clicks on a button. It is supposed to go to the next record. If the next record is empty, I want Access to jump back to the previous record and issue a message indicated it is the end of the records.
This works fine until I get to the end of the record set. Then I get an "invalid use of Null" warning. Any ideas?
DoCmd.GoToRecord , , acNext
Dim strParty As Integer
strParty = Me.Party_Type_ID
If strParty < 1 Then
DoCmd.GoToRecord , , acPrevious
MsgBox "End of Record", vbOKOnly
End If
This works fine until I get to the end of the record set. Then I get an "invalid use of Null" warning. Any ideas?
DoCmd.GoToRecord , , acNext
Dim strParty As Integer
strParty = Me.Party_Type_ID
If strParty < 1 Then
DoCmd.GoToRecord , , acPrevious
MsgBox "End of Record", vbOKOnly
End If