Hi,
I have a (pre record selector) form with one text box to enter a primary key to then open the main form to the specific record.
using
[CODE][Private Sub CmdSearch_Click()
DoCmd.OpenForm "Internal Survey Form", , , "Propref = '" & Me.txtPropref & "'"
End Sub/CODE]
It still opens to a blank form if there is no record matching.
How can I prevent the main form opening and have a message saying no record found?
Thanks
Graeme