2 combo boxes

M

Maracay

Hi Guys

I Have 2 combo box the first is clients and the second one is materials,
what I want is to select the client with the first combo box, but when I
select the second combo box for material I just want to see the material
assigned to the client I previously create, I have a query with clients and
material and the criteria is [forms].[frmOrders].[ComboClientName] and I
place this query as row source in combo box material, but is not updated when
the client change, I will really appreciate if someone can help me with this.

Thanks
 
J

Jeff Boyce

Unless you tell Access to refresh the source for the second combobox, it
won't do that.

In your first combobox's AfterUpdate event, add something like (untested):

cboYourSecondCombobox.Requery

Use the names of your comboboxes.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
M

Maracay

Thanks, it works

Jeff Boyce said:
Unless you tell Access to refresh the source for the second combobox, it
won't do that.

In your first combobox's AfterUpdate event, add something like (untested):

cboYourSecondCombobox.Requery

Use the names of your comboboxes.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Maracay said:
Hi Guys

I Have 2 combo box the first is clients and the second one is materials,
what I want is to select the client with the first combo box, but when I
select the second combo box for material I just want to see the material
assigned to the client I previously create, I have a query with clients
and
material and the criteria is [forms].[frmOrders].[ComboClientName] and I
place this query as row source in combo box material, but is not updated
when
the client change, I will really appreciate if someone can help me with
this.

Thanks


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top