ONERROR ?

F

frustrated

I have a button on a form and when you click it, I want it to open another
form to a certain record. That works just fine, however, when that criteria
doesn't exist, I want to give an error and then allow them to enter new
criteria. This does work to an extent. Even if the criteria exists in the
db, I get the error message and it wants me to enter new criteria. The
set-up of the macro is as follows:
Action Argument
OpenForm frm_Cell_Users, Form, Q_Cell_User_Cell, ,
Edit, Normal
OnError Next,
MsgBox The Cell Phone Number entered does not
exist.
Please try again., Yes, Information,
Not in database
Requery

I am not sure what I am doing wrong. I am fairly new to building macros.
Any help is GREATLY appreciated!
Thanks in advance :)
 
J

Jeanette Cunningham

Hi,
yes, it is very frustrating.
The easiest way for the users would be to give them a list of cell phone
numbers in a combo. They would pick the one they want from the list.
You can set up the row source of the combo so that it only shows numbers in
the list that will open the form.
The macro would get its criteria from the number selected in the combo.

Jeanette Cunningham
 

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