RAN wrote:
[Quoted Text] >I've got a single form with a combo box field ([Combo_NSFCertified]) whose >control source is a field from a table. When the form is opened I want the >field background to be colored red if the value of the field is not one of >the acceptable values from the combo list. I've created a hidden text field >([NSF_Certified_Unmatched]) from an unmatched query, which compares the value >to the accepable list. I've tried using conditional formatting with >Expression Is [Combo_NSFCertified]=[NSF_Certified_Unmatched], but this isn't >working. > >I've also tried using the On Not in List with the following code: >Private Sub Combo_NSFCertified_NotInList(NewData As String, Response As >Integer) >Me!Combo_NSFCertified.BackColor = vbRed >End Sub
Why not just set the combo box's LimitToList property so an invalid entry can not be entered?
-- Marsh MVP [MS Access]
|