PC Review


Reply
Thread Tools Rate Thread

1 combo box changes per 2 other combo boxes

 
 
PJLaux
Guest
Posts: n/a
 
      27th Jul 2010
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.
 
Reply With Quote
 
 
 
 
Bob Quintal
Guest
Posts: n/a
 
      27th Jul 2010
PJLaux <(E-Mail Removed)> wrote in
news: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
 
Reply With Quote
 
PJLaux
Guest
Posts: n/a
 
      27th Jul 2010
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?
 
Reply With Quote
 
PJLaux
Guest
Posts: n/a
 
      27th Jul 2010
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 - Combo Boxes to break down list in othe combo box A_Barnes General Software 1 23rd Jul 2011 03:05 PM
Getting Combo boxes to change options based on other Combo boxes. Ancient Wolf Microsoft Excel New Users 1 27th Mar 2009 06:29 PM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes =?Utf-8?B?RG9jdG9yRw==?= Microsoft Excel Programming 4 30th Jan 2009 10:18 PM
Parameter queries using forms with combo boxes, with select all, and defaulting combo boxes to blank fields nmoakeh@byte-x-byte.com Microsoft Access 12 15th Oct 2006 07:35 PM
Make combo boxes change contents depending on other combo boxes =?Utf-8?B?R2x5bm4=?= Microsoft Access Forms 1 9th Dec 2005 01:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 AM.