Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Two Combo Boxes

Status
Not open for further replies.

Cain24

Programmer
Oct 22, 2009
2
US
Hey,

I'm pretty new to this, so I appreciate any help you guys can give me.

I have one combo box that gets it's data from a database in MS Access. What I want to happen is that when, say, item A is picked in that first combo box then combo box #2 gets updated with database A. When item B gets picked, then combo box 2 updates with database B, and so on... Any help would be great.

Thanks
 


Hi,

What application are you programming in?

How are you accessing the MS Access db?

What are database A & database B? Both MS Access?

The short answer is, the selection from combobox 1 is used as the criteria for the second query linked to combobox 2.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hey Skip,

I'm using Visual Basic 2008 Express Edition and both A and B are Access databases. The databases are accessed by binding them as a DataSource. This isn't working when I want to do multiple databases to one combo box, I guess you can only bind one database to one combo box.

Thanks.
 


Visual Basic 2008 Express Edition

This forum is VBA for Applications like Excel, Word, Outlook, Powerpoint. You ought to be posting in some other forum.

This isn't working when I want to do multiple databases to one combo box

You must has 2 separate connection objects and open 2 separate recordset objects. Then join the data programatically. If it were Excel, I'd return the data to two separate sheets and then run a UNION query.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 



Are you trying to get the Oil Filter values?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top