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

Combo Box Text Validation

Status
Not open for further replies.

psyam

Programmer
Jul 29, 2005
4
0
0
US

Hi Evry 1,

I using a form for user to enter data for a new record and i have a combobox on it .How to restrict user not to enter anything except to select from the options I have?

Thanx for ur time,
Syam.
 
If I understand correctly, you wish to limit the combo box selection to the Select Statement used within the Combo-box. There is a property called Limit-to-List within the combo-box. Select this option and set to True/Yes? htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Can you guys help with this one? I'm new to Access and I bet this is something very simple.

I have a similar situation: I have a form with a combo box with "OptionA" and "OptionB." If "OptionB" is selected, I want Access to pop a warning message with custom text, "Remeber to notate this entry." I set a data validation rule and I got the message to "pop" correctly, but Access won't allow the user to continue unless "OptionA" is selected.

I want "OptionB" to remain in the combo box but allow the user to click "ok" on the message and move on to the rest of the fields in the form, I thought I reach out for help.

Thank you all so much!
Howard


I'm sure it's something simple, but I'm such a "newbie" to Access and this forum.
 
Perhaps OnChange Event? On the OnChange of the combo B is selected, simply have a msgbox in the OnChange Event. Then Setfocus to the combo A

In terms of checking if a value is set before continuing? One approach is to have a check on the OnChange Event of every control to insure that a value is selected. Or BeforeSave? many options here...

htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
After update event of combobox
use Select Case Me.Name of the combobox

Case "OptionA"
Do Noting

Case "OptionB"
Msgbox "Remember to notate...."

End Select

You can also use IF statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top