J
joemeshuggah
i have 3 interdependent combo boxes...region, department, and requestor. the
options to choose from in the department box are filtered based on the region
selected. the options to choose from in the requestor box are filtered based
on the department selected.
my problem is that when a region is selected, the department and requestor
boxes automatically default to their respective first values. im looking for
the following to occur:
1. user selects region
2. department box remains blank, but cannot remain null, so that the user is
forced to make a selection
3. once department is selected, requestor box remains blank, but cannot
remain null, so that the user is forced to make a selection
in short, i would like the boxes to default to a blank value, forcing the
user to make a selection, but require that a selection be made prior to
saving the record.
here is the code that i currently have:
Option Compare Database
Private Sub Combo44_AfterUpdate()
Combo46.Requery
Combo46.Enabled = True
Combo46 = Combo46.ItemData(0)
Combo47.Requery
Combo47.Enabled = True
Combo47 = Combo47.ItemData(0)
End Sub
Private Sub Combo46_AfterUpdate()
Combo47.Requery
Combo47 = Combo47.ItemData(0)
Combo47.Enabled = True
End Sub
Private Sub Form_Current()
If IsNull(Combo44) Then
Combo46.Enabled = False
Combo47.Enabled = False
Else
Combo46.Requery
Combo46.Enabled = True
If IsNull(Combo46) Then
Combo47.Enabled = True
Else
Combo47.Requery
Combo47.Enabled = True
End If
End If
End Sub
Private Sub Form_Load()
'nothing - Current event will be fired
End Sub
What in this code do I need to modify in order to accomplish the above?
Thanks!!!
options to choose from in the department box are filtered based on the region
selected. the options to choose from in the requestor box are filtered based
on the department selected.
my problem is that when a region is selected, the department and requestor
boxes automatically default to their respective first values. im looking for
the following to occur:
1. user selects region
2. department box remains blank, but cannot remain null, so that the user is
forced to make a selection
3. once department is selected, requestor box remains blank, but cannot
remain null, so that the user is forced to make a selection
in short, i would like the boxes to default to a blank value, forcing the
user to make a selection, but require that a selection be made prior to
saving the record.
here is the code that i currently have:
Option Compare Database
Private Sub Combo44_AfterUpdate()
Combo46.Requery
Combo46.Enabled = True
Combo46 = Combo46.ItemData(0)
Combo47.Requery
Combo47.Enabled = True
Combo47 = Combo47.ItemData(0)
End Sub
Private Sub Combo46_AfterUpdate()
Combo47.Requery
Combo47 = Combo47.ItemData(0)
Combo47.Enabled = True
End Sub
Private Sub Form_Current()
If IsNull(Combo44) Then
Combo46.Enabled = False
Combo47.Enabled = False
Else
Combo46.Requery
Combo46.Enabled = True
If IsNull(Combo46) Then
Combo47.Enabled = True
Else
Combo47.Requery
Combo47.Enabled = True
End If
End If
End Sub
Private Sub Form_Load()
'nothing - Current event will be fired
End Sub
What in this code do I need to modify in order to accomplish the above?
Thanks!!!