MS2007 - I have 2 combo boxes, 'cboDivisions' & 'cboGroups'. User selects the division from 'cboDivisions' but not all Divisions have groups associated. If there are no groups for the selected division, I set cboGroups invisible property. The problem I am having is my users are not always selecting a Group for a Division when there are some present. I want to force them to select a Group when the Divsion had them. I have put some code in the Form_BeforeUpdate event. The test for cbo_group.value works and the msbbox is displayed
Here is the code I am using:
-
If IsNull(cbo_group.value) or (cbo_group.value) = "" Then
-
msgbox "Group is required"
-
cbo_group.setfocus
-
Exit sub
-
End If
-
]
I thought about putting the code on the exit of the cbo_groups event, however, if the user does not click in the group combo box, it won't work. Any suggestions?