This is a sort of awkward method, and there may well be a better way, but here's what I've done in the past
1. Set "limit to list" (properties - data tab) to "No"
2. For the "on exit" event write code along the lines of...
If Me.cboBox.Value <> "combo boxitem1" And Me.cboBox.Value <> "comboboxitem2" Then
MsgBox "friendly message here", vbOkOnly, "field not searchable"
End If
The "If" line goes through all items in the list. Works better for smaller combo boxes. If anyone else has an alternative, I'd love to hear it!
Sounds reasonable. It occurred to me that if you add the following line after the MsgBox it would always plunk the user rightback into the combo box (and keep doing it until they got it right)
cdwd,
have a look at the onNotInList event. This fires when you have set the limit to list to false and the user enters something new.
The help file shows a way of asking if that value should be added to the list or not.
HTH
Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.pnn.police.uk
----------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.