Re: Drop Down Boxes

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

From: Alex Dybenko (alex_at_PLEASE.cemi.NO.rssi.SPAM.ru)
Date: 12/08/04


Date: Wed, 8 Dec 2004 17:46:11 +0300

so you have a Form1 with Combo1 and Combo2
in Combo1 you have have a list of countries
in combo2 you want to list orders for selected country
so in Combo2 rowsource you have a following query:

Select OrderID, OrderNum from Orders Where OrderCountry=Forms!Form1!Combo1

and finally you go to Combo1 AfterUpdate event event proc, adn write there:

Me.Combo2.Requery

HTH

-- 
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Paul" <Paul@discussions.microsoft.com> wrote in message 
news:F289736A-2E7D-424A-84C3-435EBFE127C3@microsoft.com...
> Alex,
>
> Thanks for your response Alex.
>
> You will have to explain what you mean in more detail for me, i.e. a step 
> by
> step process.  Sorry to be a pain but I am a relatively new user to 
> Access.
>
> Thanks
>
> Paul
>
> "Alex Dybenko" wrote:
>
>> while making a rowsource query for combo2 - use combo1 value in criteria,
>> and in Combo1 afterupdate event run Combo2.Requery to update it rowsouce
>> after selection in Combo1 was done
>>
>>
>> -- 
>> Alex Dybenko (MVP)
>> http://Alex.Dybenko.com
>> http://www.PointLtd.com
>>
>>
>>
>>
>> "Paul" <Paul@discussions.microsoft.com> wrote in message
>> news:EE7253BF-C275-4E35-9FFB-2495EA4E175D@microsoft.com...
>> > Hi,
>> >
>> > Help!!  I will try to explain this so it makes sense, I hope.
>> >
>> > I have a form and on it are 2 drop down boxes, and basically what I 
>> > need
>> > to
>> > do is when I select an option from the first drop down box I then need
>> > that
>> > to filter the second drop down box based on the first drop down box
>> > selection??
>> >
>> > Hope this makes sense, if not let me know and I will try and explain.
>> >
>> > Paul
>>
>>
>> 


Relevant Pages

  • Re: 2 combo boxes and 1 text box filtered
    ... Create a query that selects this field from Table1. ... To get Combo2 to be limited to only the selecte item, you will need to use code like this: ... Once the selection has been made in Combo1, I'd like Combo2 to show column 2 ...
    (microsoft.public.access.formscoding)
  • 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: 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: 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)