I have a form that or may not contain multiple records. I want to check the record count and display a message to the user if multiples exist. I put the code below in the "On Open" event, but it does not run the check. However if I open the form, go to design view, and the toggle back to form view it works perfectly. What event can I enter the code into so I don't have to leave form view and go back. I am using Access 2002.
Dim x As Integer
x = RecordsetClone.RecordCount
If x > 1 Then
MsgBox "More than 1 record"
Else
End If
Dim x As Integer
x = RecordsetClone.RecordCount
If x > 1 Then
MsgBox "More than 1 record"
Else
End If