Link subform to unbound combo Boxes

rsadmin

New member
Local time
Today, 07:32
Joined
Aug 15, 2008
Messages
3
Hell friends:

I have 2 combo boxes. cboGENRE and cboARTIST , which using dependency, meaning when cboGENRE is selected, cboARTIST is given the respective value.

These 2 combo boxes are on an unbound form called frmMASTER

I have a tab control in place with associates tabs to the cboARTIST (i.e. Band details, tour dates, discography, etc.

My 2 combo boxes are unbound and cboARTIST is dependent on cboGENRE. How do I link the tab control to the unbound cboARTIST so it only populates the record based on the cboARTIST?

One other note, in the below tab, "Details" the Band ID would be equal to column 1 in the cboARTIST.

testyt5.jpg


Thanks in advance,

Matt
 
Try this:

Bind the frmMASTER to the Bands Table or Query:

Make sure you check to ensure the Table Name and the BAND ID name are correctly spelled. Make sure the Controls within the Tab Control are bound to Table (not the two Combo Boxes above the Tab Control).

Code:
Dim StrgSQL As String

StrgSQL = "SELECT * FROM MyBandDataTable WHERE [BandID]=" & Me.cboArtist.Column(0) & ";"
Me.RecordSource = StrgSQL

About: Me.cboArtist.Column(0) - Usually, Column 0 would contain the ID in a Combo Box.

.
 

Users who are viewing this thread

Back
Top Bottom