Table with series of Combo Boxes.

utopianbl

New member
Local time
Today, 11:11
Joined
Jul 20, 2006
Messages
3
Hey

I am having a problem with a table. I want to setup a table with a series of combo boxes. Each of these combo boxes will be taking its data from a Host Query, and each of these combo boxes will be dependent on the last boxes.

I am unable to create a link for this, and any help from you folks would be highly highly appreciated.

As an example, if I have 10 columns in my "combo-table". All of the data that is to go within these columns are hosted by "host-query". In column A I want to be able to get all the unique records from "host-query". In column B, I want to get records from "host-query" which agree with the dependency with column A. And so on and so forth.

A dummy row source that I created (incorrectly, and hence doesn't function) is
SELECT qry_HostQuery.B FROM qry_HostQuery INNER JOIN tbl_ComboTable ON qry_HostQuery.A=tbl_ComboTable.B.rowsource GROUP BY qry_QueryHost.B;

Any help!
 
If you're trying to do that at table level you won't be able to do it. You'll need to use a form.
 
hey Neil,

so you're saying there is no possibility of having to use the prior columns as criterias for the current column within a table?

Thanks for the quick response here.
 
You need to make a form and place in how ever many combo boxes you need to drill down the data. for each combo box you need to have the after update event send instruction to the next combo box for the row source of the combo box.

Private Sub cboOne_AfterUpdate()
On Error Resume Next
cboTwo.RowSource = "SELECT table.field1, table.field2, table.field3, table.field4 " & _
"FROM table " & _
"WHERE table.field1 = '" & cboOne.Value & "' " & _
"ORDER BY field1;"
End Sub

Substitute your names for cboOne is the first box, cboTwo the second, table as the source table, field1 as the first source field, etc.
 

Users who are viewing this thread

Back
Top Bottom