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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Supress the dialog on a Form ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a list box with the name of all 52 US States, the user can select names on that list, they could not put a new name on that (they are in no position to do that :)). To prevent a misstyping on the list I already put a message box that say "No such a state in the US!) However another dialog just allways pop up (default from MS Access). The question is how to suppress the 2nd warning (unnessesary) ? Thanks
 
Hi, is it a list box or a combo box? I think it's a combo because users can't type into a list box. To aviod the whole issue you could set the property "Limit To List" to "True" This way they can't even type in the box if it doesn't match something in the list. Kyle ::)
 
The problem is I don't want the Access default warning dialog to say that the name is on the list, I want my dialog to appear (the guys at my office tend to skip the default dialog!) that's why I need to supress the deault one. Thanks,
By the way, true its the combo box. Thanks again ;)
 
The problem is I don't want the Access default warning dialog to say that the name is on the list, I want my dialog to appear (the guys at my office tend to skip the default dialog!) that's why I need to supress the deault one. Thanks,
By the way, true its the combo box. Thanks again ;)
 
Well, there are a few ways to do it through VBA... You could "Set Warnings" to false (...shudder...) or you could handle the error yourself. If you leave "Limit To List" on true, then you'll need to turn off the warnings (not recomended), or continue as you were with whatever code you were using and put in an check yourself (like "OnFocus") to look through the list and what was entered and verify through your code. Kyle ::)
 
If you set LIMIT TO LIST to YES and AUTO EXPAND to YES, there's no way they can possibly TYPE an incorrect letter. Access would just ignore it.

Unless the person has congressional powers, you normally wouldn't want them "adding" to the state list anyway, right?




Ex-JimAtTheFAA
78.5% of all statistics are made up on the spot.
Another free Access forum:
 
Thanks, Jim, I knew there was a way to limit, I just forgot about autoexpand (I always use it so I forgot about it). Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top