J
joemeshuggah
i am a novice to access and im looking to learn how to create multiple
cascading combo boxes. for example, i have 3 tables...a region table, a
department table, and a requestor table...with a combo box for each on a
form. my goal is to have a user select a region in the region combo box,
which would then limit the choices in the department combo. once the user
selects a department, the choices in the requestor combo would be limited.
i am able to get this to work for the region and department, but have no
idea how to incorporate coding for the third. here is the coding that i am
using (Combo44 is for region, Combo46 is for department). how should the
coding look if i am to incorporate the third combo box for requestor?
Option Compare Database
Private Sub Combo44_AfterUpdate()
Combo46 = Null
Combo46.Requery
Combo46 = Me.Combo46.ItemData(0)
End Sub
Private Sub Form_Current()
Combo46.Requery
End Sub
Private Sub Form_Load()
If IsNull(Combo44) Then
Combo44 = Me.Combo44.ItemData(0)
Call Combo44_AfterUpdate
End If
End Sub
cascading combo boxes. for example, i have 3 tables...a region table, a
department table, and a requestor table...with a combo box for each on a
form. my goal is to have a user select a region in the region combo box,
which would then limit the choices in the department combo. once the user
selects a department, the choices in the requestor combo would be limited.
i am able to get this to work for the region and department, but have no
idea how to incorporate coding for the third. here is the coding that i am
using (Combo44 is for region, Combo46 is for department). how should the
coding look if i am to incorporate the third combo box for requestor?
Option Compare Database
Private Sub Combo44_AfterUpdate()
Combo46 = Null
Combo46.Requery
Combo46 = Me.Combo46.ItemData(0)
End Sub
Private Sub Form_Current()
Combo46.Requery
End Sub
Private Sub Form_Load()
If IsNull(Combo44) Then
Combo44 = Me.Combo44.ItemData(0)
Call Combo44_AfterUpdate
End If
End Sub