Hi,
I want access to pops up a message if users data are not mach with database base on criteria. If no data mach with database, query won’t show anything. That’s how I wrote the code. But I don’t know after I run the code it shows ” Run-time error ‘2450’: Micorosoft Access can’t find the form ‘frmResult’ referred to in a macro expression or Visual Basic code. Below is my code:
Private Sub Search_Click()
If Forms![frmResult].Form.RecordsetClone.RecordCount = 0 Then
MsgBox “There is no data for this searching. Canceling …”
Else
DoCmd.OpenForm “frmResult”
End If
End Sub
Thanks