Like Q Msg box if no record found.

K

KAnoe

I use a like Q so the user can lookup a record by SSN. The
SSN is in Text format and the user cant use dashes. If not
record is found I would like a Msg box to come up and not
a blank form. How do I do this?

Also can I make it so the user can do the lookup with or
without the dashes?

Thanks
 
D

Dan Artuso

Hi,
You can check the RecordsetClone Count property (on the form you are opening) to see if there are any records.
Use the Replace function to get rid of any dashes before you pass the string as criteria.
Help will show you the syntax. Just replace any dashes with an empty string: ""

HTH
Dan Artuso, MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top