H
HYD2
I have a form which gets data from a parameter query. I want to send a
message if the results of the parameter is null, before is opens the form
(which will be blank).
I found this helpful information on this site and has worked for several
other forms, but no matter what I do, this does not seem to work: It stops on
the If statement.
*** FYI - the query name is correct
Private Sub Form_Load()
If DCount("*", "Prod Find RBT Number qry") = 0 Then
MsgBox "Robot number not found on that System"
DoCmd.Close
Else
DoCmd.OpenForm "Prod Find RBT Number form"
End If
End Sub
message if the results of the parameter is null, before is opens the form
(which will be blank).
I found this helpful information on this site and has worked for several
other forms, but no matter what I do, this does not seem to work: It stops on
the If statement.
*** FYI - the query name is correct
Private Sub Form_Load()
If DCount("*", "Prod Find RBT Number qry") = 0 Then
MsgBox "Robot number not found on that System"
DoCmd.Close
Else
DoCmd.OpenForm "Prod Find RBT Number form"
End If
End Sub