How do i make one value depend on another?

G

Guest

I am making a database and i have a dropdown list in my table, in this list
are values of another table. based on the value selected in this list i want
to change the values of the next dropdown list.

example:
when the first dropdown list contains : Audi | BMW | Ford
I want the next dropdown list to display only the models of the selected car.

Any help on this one?
 
C

ChrisM

Rosflurg said:
I am making a database and i have a dropdown list in my table, in this list
are values of another table. based on the value selected in this list i
want
to change the values of the next dropdown list.

example:
when the first dropdown list contains : Audi | BMW | Ford
I want the next dropdown list to display only the models of the selected
car.

Any help on this one?

Just to get you started,

You need (at least 2) Tables:

Manufacturers
==========
ManufName
------
BMW
Ford
....
....

Models
ManufName Model
Ford Focus
Ford Mondeo
BWM 316
BMW 530
....
....


The First Dropdown list would be based on the Manufacuters Table.

The Second would be based on a query on the Models Table:

Select * from Models WHERE ManufName = ddlManufacturer.Text

Cheers,

Chris.
 
G

Guest

Okay this helps a little.

I just have problems creating the needed query.

The Table with the manufacturers is named Brands and the needed column Brand
The table with the models is named Model and contains column Brand and
column Model
I need the model to be displayed in table Cars in column Model. but i need
to use the value from the Brand column in table Cars to do so.

How do i make a query for this?
 

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