Requerying 2nd combo box after change to 1st combo box 
Author Message
 Requerying 2nd combo box after change to 1st combo box

Hi,

I have two combo boxes - the second combo box is filled from a query which
uses the value chosen in the first combo box.  This works fine the first
time through.  Although, if we change the value of the first combo box the
choices in the second combo box stay the same.
The first combo box is called Category, and the second combo box is called
Object

Is it possible to have the choices in the second combo box(Object) refresh
with the new values due to the change in combo box one(Category)

Any and all help is greatly appreciated.

Thanks in advance.

EDGEConsulting
---------------------------
Code Follows:

Private Sub Form_Current()
  Me.Category.Requery
  Me.Object.Requery
End Sub

Private Sub Category_AfterUpdate()
DoCmd.ReQuery (object)
End Sub

Private Sub Object_AfterUpdate()
DoCmd.Requery (InvType)

End Sub



Sat, 14 Sep 2002 03:00:00 GMT  
 Requerying 2nd combo box after change to 1st combo box
create an after update event for combo box 1 which has this code

    [combo box 2].requery

On Tue, 28 Mar 2000 21:36:10 -0600, "EDGEConsulting"

Quote:

>Hi,

>I have two combo boxes - the second combo box is filled from a query which
>uses the value chosen in the first combo box.  This works fine the first
>time through.  Although, if we change the value of the first combo box the
>choices in the second combo box stay the same.
>The first combo box is called Category, and the second combo box is called
>Object

>Is it possible to have the choices in the second combo box(Object) refresh
>with the new values due to the change in combo box one(Category)

>Any and all help is greatly appreciated.

>Thanks in advance.

>EDGEConsulting
>---------------------------
>Code Follows:

>Private Sub Form_Current()
>  Me.Category.Requery
>  Me.Object.Requery
>End Sub

>Private Sub Category_AfterUpdate()
>DoCmd.ReQuery (object)
>End Sub

>Private Sub Object_AfterUpdate()
>DoCmd.Requery (InvType)

>End Sub

-------------------
Richard Killey

Visit www.comeandread.com/access for some Access 97 tips.



Sun, 15 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Write to 3 combo boxes based on choice in 1st Combo Box

2. Getting data from one combo box and creating recordsource in 2nd combo box

3. Using Entry From Combo Box To Filter Entries In A 2nd Combo Box

4. using one combo box to break down the results in the 2nd combo box

5. combo box outcome in 2nd combo box

6. changing Unbound combo box to bound combo box

7. Combo box list that changes based upon another combo box

8. Update a combo box after changing values in another combo box

9. Combo box selection changes all combo box selections in continuous form

10. using combo box selection to change another combo box's option


 
Powered by phpBB® Forum Software © phpBB Group