Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Trapping a Parameter Values Box.

Status
Not open for further replies.

JesseL

IS-IT--Management
Jul 29, 2002
59
US
Hello.. I made a Edit Information form based on a query. There is also a the main form where I have a command button that When it is clicked on the form, the user has to enter in the "Mrd Unit Number" to access this form. In the criteria section for the "Mrd Unit Number", i put [Please enter the mrd unit number].

I would like to error trap the value typed in the parameter value pop up box. I am assuming something in VBA i guess. This command button is called cmdOpenEditFrm. So when the user clicks on the command button this parameter value box will pop up and they have to enter the "Mrd Unit Number"(this can be a number from 1-200, or whatever)

If the user enters in "blah.. blah", and it isn't a Mrd Unit number,(This is where i want to error trap it) I would like to have a Message box that pops up and says "Sorry, You have to enter in the correct Mrd Unit Number".
 
Also, when the user enters in anything they want into that parameter box, the Edit Information form pops up blank because they did not enter a "Mrd Unit Number" that is in one of the records. I do not want the form to pop up if they do not enter a mrd unit number.

On the edit information form, i would like a command button called "cmdEditAnother" and i would like to error trap it the same way as the command button on the main form. Same code i am assuming, so thats no problem.. I hope :/

Does anyone know how to error trap this parameter value box if the user enters just anything?

I tried to be as descriptive as possible, i hope you professionals out there know what i am talking about.

thanks
ksharp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top