On Jul 27, 7:21*am, PJLaux <pl...@yahoo.com> wrote:
> On Jul 26, 6:40*pm, Bob Quintal <rquin...@sPAmpatico.ca> wrote:
>
>
>
>
>
> > PJLaux <pl...@yahoo.com> wrote innews:93897efb-9d20-4b98-8149-(E-Mail Removed)
> > m:
>
> > > I have a form with 3 combo boxes. “Company”, “Tax ID”, and “Tax
> > > Type”. *The Tax Type is supposed to give options based on the
> > > criteria that the user choses from the Tax ID and Tax Type combo
> > > boxes. *I do this by having a table with these 3 fields (the table
> > > name is Tbl_A04_Co_TaxType_TaxID) and then a qry,
> > > “Qry_A07_DropDown_For_TaxID” is in the Row Source for the Tax ID
> > > Combo. *This qry has the following sql code, SELECT
> > > Tbl_A04_Co_TaxType_TaxID.[Tax ID] FROM Tbl_A04_Co_TaxType_TaxID
> > > WHERE (((Tbl_A04_Co_TaxType_TaxID_.Company)=[Forms]![frm_Main]!
> > > [txt_company]) AND ((Tbl_A04_Co_TaxType_TaxID_.[Tax
> > > Type])=[Forms]! [frm_Main]![Combo_TaxType])); *When I choose the
> > > criteria in the drop downs for the Company and Tax Type combo
> > > boxes for the first time, I will get the correct fields in the
> > > drop down for the Tax ID, but my problem is that if I need to
> > > change the data in the tax type combo box , my Tax ID drop-down
> > > will not change accordingly – it just keeps the original data
> > > choices based on the original Tax Type that I chose . *I have put
> > > a macro in the After Update property of the Tax Type Combo Box,
> > > which runs the Qry_A07_DropDown_For_TaxID and then saves it with
> > > the reasoning that maybe this would fix the problem, but it
> > > didn’t. *Thanks for any help on this.
>
> > Running the query does not update the copy of the query that's in the
> > form, so you need to requery the combobox specifically.
>
> > Change the after_update event of your Tax Type combo box to
> > a macro that requeries the combobox, instead of the query itself- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks for your reply. *How do you requery a combobox?- Hide quoted text -
>
> - Show quoted text -
Nevermind - I figured it out. Thanks.
|