Greetings. I am doing an app with a form that allows for a user to enter a maximum of 2 records. It has a combobox (comcbobox1) with 5 values that go in a Type field - a, b, c, d, e'). There are rules about whether certain values can be selected based on whether the other record value for Type. One example of a rule might be to not allow selection of 'a' if the other record has b, d, or e in the type.
My plan is to use the event like below which I am using for other controls to ensure the proper data entry (numeric, date, etc.) which works fine on other controls.
Private Sub comcbobox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
CheckFor = ActiveControl.Value
Cancel = Not ControlValidate(CheckFor)
End Sub
A label will appear with the appropriate selection choices. But the ControlValidate function does not fire unless I tab away, or select one of the buttons. I don't want to let the user move off of the combobox until a valid selection is made. Most of the event do not allow the "ByVal Cancel..." arguments.
How can I go about doing this?
Bookmarks