Filter combo box from multiple combo boxes

G

Guest

I've read the threads regarding filtering one cbo off of another but what if
i need to filter a cbo off of 2 other boxes?
I have:
cboVendor
cboDevice
cboModel
Currently i filter cbomodel based on the choice from cboDevice.
what i need to do is to filter the cbomodel based on the choices from both
cboVendor and cbodevice because more than 1 vendor may make the same device
but with a different model number. Otherwise my cbomodel list gets rather
long for the user.
 
G

Guest

Link the RowSource of cbomodel to link to the other to combo's

Select Modal From [model Table] Where Device =
Forms![mainFormname].[cbodevice] And Vendor = Forms![MainFormName].[cboVendor]

On the after update event of both combo's cboVendor and cbodevice you need
to refresh the list in combo cbomodel

Me.cbomodel.Requery
 
G

Guest

You can link a query to how many combo's that you would like, there is no
limit.

Select * From TableName Where Field1 = Forms![FormName]![Combo1Name] And
Field2 = Forms![FormName]![Combo2Name] And Field3 =
Forms![FormName]![Combo3Name]

Papa Jonah said:
I am struggling with a similar problem. For each of my combos, the result is
bound to a seperate table therefore each combo box is in a seperate subform.
The query criteria, as well as the afterupdate code is really tripping me up.
As long as I put the comboboxes on one form, I think I have it made - but my
understanding is that I am limited to one entry for each box if I do it that
way because I am then limited to everything being bound to a single table.

Is this correct?

Ofer said:
Link the RowSource of cbomodel to link to the other to combo's

Select Modal From [model Table] Where Device =
Forms![mainFormname].[cbodevice] And Vendor = Forms![MainFormName].[cboVendor]

On the after update event of both combo's cboVendor and cbodevice you need
to refresh the list in combo cbomodel

Me.cbomodel.Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


coachjeffery said:
I've read the threads regarding filtering one cbo off of another but what if
i need to filter a cbo off of 2 other boxes?
I have:
cboVendor
cboDevice
cboModel
Currently i filter cbomodel based on the choice from cboDevice.
what i need to do is to filter the cbomodel based on the choices from both
cboVendor and cbodevice because more than 1 vendor may make the same device
but with a different model number. Otherwise my cbomodel list gets rather
long for the user.
 
G

Guest

I am struggling with a similar problem. For each of my combos, the result is
bound to a seperate table therefore each combo box is in a seperate subform.
The query criteria, as well as the afterupdate code is really tripping me up.
As long as I put the comboboxes on one form, I think I have it made - but my
understanding is that I am limited to one entry for each box if I do it that
way because I am then limited to everything being bound to a single table.

Is this correct?

Ofer said:
Link the RowSource of cbomodel to link to the other to combo's

Select Modal From [model Table] Where Device =
Forms![mainFormname].[cbodevice] And Vendor = Forms![MainFormName].[cboVendor]

On the after update event of both combo's cboVendor and cbodevice you need
to refresh the list in combo cbomodel

Me.cbomodel.Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


coachjeffery said:
I've read the threads regarding filtering one cbo off of another but what if
i need to filter a cbo off of 2 other boxes?
I have:
cboVendor
cboDevice
cboModel
Currently i filter cbomodel based on the choice from cboDevice.
what i need to do is to filter the cbomodel based on the choices from both
cboVendor and cbodevice because more than 1 vendor may make the same device
but with a different model number. Otherwise my cbomodel list gets rather
long for the user.
 

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