Control property ValidationRule... can it reference another control?

andreas_udby

Registered User.
Local time
Today, 08:58
Joined
May 7, 2001
Messages
76
Hello, all. I have two combo boxes on a form; each has integer values from 1 to 5. ComboGreen cannot be greater than ComboRed, so if the user selects "3" in ComboRed, they should be restricted from choosing "4" or "5" from ComboGreen. I thought I could use the ValidationRule property to do this, but it isn't working. Any thoughts? Is there a macro action that would compare the two controls?

On a related note: I have a text box that calculates a value based on the values of (ComboRed minus ComboGreen). I tried putting in a ValidationRule in there to prevent a negative result (trying to achieve the same effect as above), but the ValidationRule/ValidationText properties didn't do anything. Is there a message box or something that's supposed to pop up if the ValidationRule is violated?

Thanks,
Andreas
 
You need a where clause for the 2nd cbo

WHERE FieldName Not In ([Forms]![FormName]![ComboBoxOne])
 

Users who are viewing this thread

Back
Top Bottom