Creating an interactive for car ordering system

A

Astitva

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

mscertified

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
 
M

mscertified

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
 
A

Astitva

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.
 

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

Top