Re: 2 combo boxes and 1 text box filtered

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"el bebe" <el bebe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:27A8A7D6-57DC-4EFB-9580-1BFD61CCEC4C@xxxxxxxxxxxxxxxx
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!

.



Relevant Pages

  • Re: IIf statement in query criteria
    ... It would help if you showed the query you are trying to build and told us a little bit about the type of fields you are applying the criteria against. ... what I am trying to do is show all choices in combo2 if there has not been a selection in Combo1; And show a filtered selection in Combo2 if there is a selection in Combo1. ...
    (microsoft.public.access.queries)
  • RE: IIf statement in query criteria
    ... what I am trying to do is show all choices in combo2 if there ... has not been a selection in Combo1; And show a filtered selection in Combo2 ... iif, No Criteria is Set, Criteria is set) ...
    (microsoft.public.access.queries)
  • RE: IIf statement in query criteria
    ... what I am trying to do is show all choices in combo2 if there ... has not been a selection in Combo1; And show a filtered selection in Combo2 ... iif, No Criteria is Set, Criteria is set) ...
    (microsoft.public.access.queries)
  • Re: Drop Down Boxes
    ... so you have a Form1 with Combo1 and Combo2 ... Alex Dybenko ... >> after selection in Combo1 was done ...
    (microsoft.public.access.modulesdaovba)
  • Re: setting value of combo box
    ... Combo1 is Client_ID. ... The purpose of this DLookup is to find the most recent plan writer ... Text1, with the DLookup, displays a number being the ID of the Plan ... How do I get Combo2 to automaticaly display the same as Text1. ...
    (microsoft.public.access.formscoding)