Creating an interactive for car ordering system

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?
 
G

Guest

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
 
G

Guest

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
 
G

Guest

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.
 
G

Guest

Use listboxes not combo boxes.
If using combo boxes, set LimitToList property to true

-Dorian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top