What I'm trying to do is if the ID field is blank the do the DMAX command If ID isn't blank then display the msgbox.
I get
Run-Time error '424'
object required
Here is my code:
Private Sub AssignID_Click()
If Me.ID Is Null Then
Me.ID = DMax("ID", "tblResidents") + 1
End If
If Not Me.ID Then
MsgBox ("Resident already has an ID")
End If
End Sub
Thanks,
Rick
I get
Run-Time error '424'
object required
Here is my code:
Private Sub AssignID_Click()
If Me.ID Is Null Then
Me.ID = DMax("ID", "tblResidents") + 1
End If
If Not Me.ID Then
MsgBox ("Resident already has an ID")
End If
End Sub
Thanks,
Rick