G
ghetto_banjo
I have a form where a user can type in a value in a textbox, click a
button, and the corresponding record opens up in a different form. I
do this using the criteria in the docmd.openform command like this:
formname = "frmClaim"
criteria = "[Hawb]= '" & Me![txtHawb] & "'"
DoCmd.OpenForm formname, , , criteria, acFormEdit
This works fine (after i figured out the syntax for the criteria being
based on a text field! ). However, if the criteria is not found, I
want a message box to open up saying this "Record could not be found"
as opposed to the form opening up with a new blank record.
Any ideas on how to achieve this?
Thank you gurus!
button, and the corresponding record opens up in a different form. I
do this using the criteria in the docmd.openform command like this:
formname = "frmClaim"
criteria = "[Hawb]= '" & Me![txtHawb] & "'"
DoCmd.OpenForm formname, , , criteria, acFormEdit
This works fine (after i figured out the syntax for the criteria being
based on a text field! ). However, if the criteria is not found, I
want a message box to open up saying this "Record could not be found"
as opposed to the form opening up with a new blank record.
Any ideas on how to achieve this?
Thank you gurus!