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

Combo box help

Status
Not open for further replies.

barra47

Programmer
Dec 25, 2002
86
AU
I have a combo box which will show a list of cost codes e.g. 5-1420
but I find users are able to over type the data to something else e.g 51420
How can I stop a user from entering anything but whats in the lookup table that stores the cost codes.

Thanks in advance

 
How are ya barra47 . . .
In the [blue]NotInList[/blue] event of the combo, try this:
Code:
[blue]   Dim Msg As String, Style As Integer, Title As String
   
   Msg = "You must choose and item in the dropdown list"
   Style = vbInformation + vbOKOnly
   Title = "Not In List Error! . . ."
   MsgBox Msg, Style, Title
   Me!Combo5.Dropdown
   Response = acDataErrContinue[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top