query for lookup wizard

G

Guest

I got a table called MakeModel which basically stores the make and model of a
car.
And another table called Store that stores the car that are in stock, it
also containing the Make and Model fields.

In the Stores Table
After entering the Make of the car in the store table I want model section
to be a lookup wizard which takes the value from the Make section matches it
with the Make in the MakeModel table and displays the availabe model on that
particular Make from the MakeModel table.


SELECT Model
FROM tblMakeModel
WHERE Make=Store.Make;

I have tried to fetch data for the lookup wizard using this query but it
doesn't work so Is it possible to do so?
 
M

Marshall Barton

Astitva said:
I got a table called MakeModel which basically stores the make and model of a
car.
And another table called Store that stores the car that are in stock, it
also containing the Make and Model fields.

In the Stores Table
After entering the Make of the car in the store table I want model section
to be a lookup wizard which takes the value from the Make section matches it
with the Make in the MakeModel table and displays the availabe model on that
particular Make from the MakeModel table.


SELECT Model
FROM tblMakeModel
WHERE Make=Store.Make;

I have tried to fetch data for the lookup wizard using this query but it
doesn't work so Is it possible to do so?


It sounds like you took a wrong turn and ran off a cliff
;-)

The point is that you should not do anything in a table.
Tables should be treated as storage buckets for data.
Queries should be used for retrieving data from one or more
tables. Forms are where you interact with the data selected
by a query and reports are how you format a presentation of
a query's data.

Your idea of using a dependent combo box is very common on
forms. See http://www.mvps.org/access/forms/frm0028.htm
 

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