Barbara Sherman
New member
- Local time
- Today, 08:26
- Joined
- Jan 27, 2003
- Messages
- 7
The problem is we need to first select the brand, then the model (which should only show models for that particular brand) and then select the color (which should show only the colors for that model of boat), etc. In other words, everything must link together and the form is far from complete. There are other things to relate also.
Private Sub cboColor_AfterUpdate()
'txtColorName' = DLookup("tblColors", "ColorName ='" & _
[Forms]![frmInventoryEntry]![cboColor] * "'")
End Sub
Private Sub cboModel_AfterUpdate()
'txtModelName' = DLookup("tbl2003Models", "ModelName ='" & _
[Forms]![frmInventoryEntry]![cboModel] * "'")
End Sub
Private Sub cboBrand_AfterUpdate()
Me.cboModel.Requery
Me.cboModel = ""
End Sub
Combo Box 1 RowSource = SELECT [tblBrands].[BrandName] FROM tblBrands;
Combo Box 2 RowSource = SELECT [tbl2003Models].[ModelName] FROM tblBrands INNER JOIN tbl2003Models ON [tblBrands].[BrandID]=[tbl2003Models].[BrandID] WHERE ((([tblBrands].[BrandName])=[Forms]![frmInventoryEntry]![cboBrand]));
Box 1 and 2 are working fine. Box 3 is not working.
Please help.
Private Sub cboColor_AfterUpdate()
'txtColorName' = DLookup("tblColors", "ColorName ='" & _
[Forms]![frmInventoryEntry]![cboColor] * "'")
End Sub
Private Sub cboModel_AfterUpdate()
'txtModelName' = DLookup("tbl2003Models", "ModelName ='" & _
[Forms]![frmInventoryEntry]![cboModel] * "'")
End Sub
Private Sub cboBrand_AfterUpdate()
Me.cboModel.Requery
Me.cboModel = ""
End Sub
Combo Box 1 RowSource = SELECT [tblBrands].[BrandName] FROM tblBrands;
Combo Box 2 RowSource = SELECT [tbl2003Models].[ModelName] FROM tblBrands INNER JOIN tbl2003Models ON [tblBrands].[BrandID]=[tbl2003Models].[BrandID] WHERE ((([tblBrands].[BrandName])=[Forms]![frmInventoryEntry]![cboBrand]));
Box 1 and 2 are working fine. Box 3 is not working.
Please help.