Creating an interactive for car ordering system

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a form which is basically for car ordering system.

If the user selects the make bmw in the make field I want the model field to
display a drop down list consisting of Models available for bmw and if the
user selects Calibra I want the model field to display a drop down list
consisting of models of make Calibra.

Is it possible?
 
Yes, it's possible. Just dynamically create the query feeding the combo boxes
after each previous selection. It might be better to use listboxes.

-Dorian
 
OK, I set up a table called tblMakeModel with 2 columns Make and Model, here
I entered all combinations of Make & Model.
I set up a form called frmMakeModel with 2 listboxes lstMake and lstModel.
The first listbox is loaded by query qryMake, the second by query qryModel
Here are the queries:
qryMake:
SELECT Distinct Make from tblMakeModel;
qryModel:
SELECT Model
FROM tblMakeModel
WHERE Make=Forms!frmMakeModel!lstMake;

I put code in frmMakeModel as follows:

Private Sub lstMake_Click()
Me!lstModel.Requery
End Sub

This requeries the Model listbox whenever the Make value changes

-Dorian
 
The model field allows the user to enter their own model is there anyway to
restrict the user to chose model only from the drop down list.
 
Use listboxes not combo boxes.
If using combo boxes, set LimitToList property to true

-Dorian
 
Back
Top