Hello its been a while since i have come to this web site and its been a while since i have done any programming but here i am. my question is going to be difficult to explain but here it goes. i have been trying to make a auto parts database but i cant get it to cascade the parts i need for certain cars and years.
in my database i have 6 Comboboxes on an unbound form each one drills down to the next one as it suppose to but when i change to a different make of a car i cant seem to get the parts to show up for that make.
as you may have guessed i have six tables.
Years - YearID, Year
Make - MakeID, YearID, Make
Model - ModelID, MakeID, YearID, Model
Engine - EngineID, YearID, MakeID, ModelID, Engine
ReplacementPart s - ReplacementID, YearID, MakeID, ModelID, EngineID, ReplacementPart
Parts - PartsID, ReplacementPart sID, YearID, MakeID, ModelID, EngineID, Part, PartNumber
My Codes I Have behind Them Is This:
If you someone can take the time and look at this and see if you can help me out i would appriciate it very much. Oh I Am using Access 2000 Developers
lee123
in my database i have 6 Comboboxes on an unbound form each one drills down to the next one as it suppose to but when i change to a different make of a car i cant seem to get the parts to show up for that make.
as you may have guessed i have six tables.
Years - YearID, Year
Make - MakeID, YearID, Make
Model - ModelID, MakeID, YearID, Model
Engine - EngineID, YearID, MakeID, ModelID, Engine
ReplacementPart s - ReplacementID, YearID, MakeID, ModelID, EngineID, ReplacementPart
Parts - PartsID, ReplacementPart sID, YearID, MakeID, ModelID, EngineID, Part, PartNumber
My Codes I Have behind Them Is This:
Code:
Private Sub EngineCombo_AfterUpdate()
ReplacementPartsCombo.RowSource = "SELECT ReplacementPartsID,YearID,MakeID,ModelID,EngineID,ReplacementPart FROM ReplacementPartsT WHERE YearID=" & EngineCombo
End Sub
Private Sub MakeCombo_AfterUpdate()
ModelCombo.RowSource = "SELECT ModelID,MakeID,YearID,Model FROM ModelT WHERE makeID=" & MakeCombo
ModelCombo.SetFocus
ModelCombo.Dropdown
End Sub
Private Sub ModelCombo_AfterUpdate()
EngineCombo.RowSource = "SELECT EngineID,YearID,MakeID,ModelID,Engine FROM EngineT WHERE MODELID=" & ModelCombo
EngineCombo.SetFocus
EngineCombo.Dropdown
End Sub
Private Sub ReplacementPartsCombo_AfterUpdate()
PartsCombo.RowSource = "SELECT PartsID,ReplacementPartsID,YearID,MakeID,ModelID,EngineID,Parts,PartNumber,Price,Core,Store,Phone,City,State FROM PartsT WHERE EngineID=" & ReplacementPartsCombo
End Sub
Private Sub YearCombo_AfterUpdate()
MakeCombo.RowSource = "SELECT MakeID,YearID,Make FROM MakeT WHERE YearID=" & YearCombo
MakeCombo.SetFocus
MakeCombo.Dropdown
End Sub
lee123
Comment