justme1310
Technical User
Hello everyone,
I have the following code that checks for instances when no matching records are found.
When it happens, in addition to getting my "no records found" msg, I also get this message "The Openform Action was cancelled".
Is there anyway to stop this msg from being displayed??
Many thanks in advance
Will
I have the following code that checks for instances when no matching records are found.
When it happens, in addition to getting my "no records found" msg, I also get this message "The Openform Action was cancelled".
Is there anyway to stop this msg from being displayed??
Code:
Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "Sorry!!! No records found!"
Cancel = True
Else
CurRonc = ROncologist
CurMonc = MOncologist
End If
End Sub
Many thanks in advance
Will