2 combo boxes and 1 text box filtered

E

el bebe

I have 2 combo boxes that I'd like to relate:

Combo1's selection options (from a Table1) should be a single instance of
the first column.

Ex: Table1 items
Tires Black cheap
Tires White stripe expensive
Windows Glass expensive
Windows Plastic cheap
Speakers Round cheap
Speakers Square expensive

Once the selection has been made in Combo1, I'd like Combo2 to show column 2
of ONLY those items which match Combo1.

Ex: Combo1 = Tires/Windows/Speakers, onlye once "Windows" is selected, then
Combo2 = Glass/Plastic

Once Combo2 has been selected, I'd like textBox1 to show column 3.

Thank you!
 
A

Allen Browne

To get Combo1 limited to only unique items:
1. Create a query that selects this field from Table1.

2. In the Criteria row under this field, enter:
Not Null

3. In the query's properties set Unique Values to Yes.

To get Combo2 to be limited to only the selecte item, you will need to use
code like this:
Limit content of combo/list boxes
at:
http://www.mvps.org/access/forms/frm0028.htm

In general storing all 3 fields may not be correct, or there may be some
side effects (such as all the other rows going blank in a continuous form if
you filter out the values those rows need and the bound column is not the
display column.)
 
E

el bebe

Thank you for the response. I got steps 1 & 2.

I am not certain where #3 is located to set that value to "yes"?

I've tried using that code from that webpage and I don't understand it. It
gives me errors and I don't know how to customize it to my form, or where
exactly to put all the code.

Please help!

Thx.
 
A

Allen Browne

The Unique Values property is in the Properties box, when you open the query
in design view. (Make sure you are looking at the properties of the query,
not those of a field.)

You will need some understanding of code to do 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