Listed below is the information from my form and coding received. It worked when it was part of my regular form. The user needed it changed because they wanted to be able to select multiple items. I created a subform and entered in the same coding, however it is not working. Is there something else that needs to be added to make this happen?
Combo1 : What
ID What
1 PC
2 Wireless Device
3 Wireless Service
Combo2 : Type
ID Type WhatID
1 Laptop 1 (PC)
2 Cellphone 2 (Wireless Device)
Combo3 : Make
ID Make Type
1 Dell 1 (Laptop)
2 Verizon 2 (Cellphone)
3 Sprint 2 "
4 T-Mobile 2 "
Combo4: Model
ID Model Make
1 D300 1 (Dell)
2 LG3300 2 (Verizon)
Remou (TechnicalUser) 8 Apr 06 20:04
You need something a little like this. I have called my form frmCombos, you need to change this to the right name. You must also change the names of the tables (tblWhat etc) to match your tables, and the combo controls (cboWhat etc) to match your controls.
Row Source for combos:
cboWhat : SELECT [tblWhat].[ID], [tblWhat].[What] FROM [tblWhat]
cboType : SELECT tblType.ID, tblType.Type FROM tblType WHERE (((tblType.WhatID)=[Forms]![frmCombos]![cboWhat]));
cboMake : SELECT tblMake.ID, tblMake.Make FROM tblMake WHERE (((tblMake.TypeID)=[Forms]![frmCombos]![cboType]));
cboModel : SELECT tblModel.ID, tblModel.Model FROM tblModel WHERE (((tblModel.MakeID)=[Forms]![frmCombos]![cboMake]));
Then you will need some code. This is just the very bones, and bare at that, so that you can see how it works. You will need error coding and code to deal with items that are not in the lists (Not In List).
CODE
Private Sub cboWhat_AfterUpdate()
Me.cboType = ""
Me.cboType.Requery
Me.cboMake = ""
Me.cboMake.Requery
Me.cboModel = ""
Me.cboModel.Requery
End Sub
Private Sub cboType_AfterUpdate()
Me.cboMake = ""
Me.cboMake.Requery
Me.cboModel = ""
Me.cboModel.Requery
End Sub
Private Sub cboMake_AfterUpdate()
Me.cboModel = ""
Me.cboModel.Requery
End Sub
Combo1 : What
ID What
1 PC
2 Wireless Device
3 Wireless Service
Combo2 : Type
ID Type WhatID
1 Laptop 1 (PC)
2 Cellphone 2 (Wireless Device)
Combo3 : Make
ID Make Type
1 Dell 1 (Laptop)
2 Verizon 2 (Cellphone)
3 Sprint 2 "
4 T-Mobile 2 "
Combo4: Model
ID Model Make
1 D300 1 (Dell)
2 LG3300 2 (Verizon)
Remou (TechnicalUser) 8 Apr 06 20:04
You need something a little like this. I have called my form frmCombos, you need to change this to the right name. You must also change the names of the tables (tblWhat etc) to match your tables, and the combo controls (cboWhat etc) to match your controls.
Row Source for combos:
cboWhat : SELECT [tblWhat].[ID], [tblWhat].[What] FROM [tblWhat]
cboType : SELECT tblType.ID, tblType.Type FROM tblType WHERE (((tblType.WhatID)=[Forms]![frmCombos]![cboWhat]));
cboMake : SELECT tblMake.ID, tblMake.Make FROM tblMake WHERE (((tblMake.TypeID)=[Forms]![frmCombos]![cboType]));
cboModel : SELECT tblModel.ID, tblModel.Model FROM tblModel WHERE (((tblModel.MakeID)=[Forms]![frmCombos]![cboMake]));
Then you will need some code. This is just the very bones, and bare at that, so that you can see how it works. You will need error coding and code to deal with items that are not in the lists (Not In List).
CODE
Private Sub cboWhat_AfterUpdate()
Me.cboType = ""
Me.cboType.Requery
Me.cboMake = ""
Me.cboMake.Requery
Me.cboModel = ""
Me.cboModel.Requery
End Sub
Private Sub cboType_AfterUpdate()
Me.cboMake = ""
Me.cboMake.Requery
Me.cboModel = ""
Me.cboModel.Requery
End Sub
Private Sub cboMake_AfterUpdate()
Me.cboModel = ""
Me.cboModel.Requery
End Sub