Returning query field names in a combo box (1 Viewer)

rincewind_wizzard

Registered User.
Local time
Today, 01:20
Joined
Feb 7, 2018
Messages
23
Hi all,

I'm not even sure this is possible.

I have Combo Box 1 which selects from a list of queries in the database

Is it possible, in the next Combo box, to return a list of the field names in the query selected in Combo Box 1?

Cheers for any help on this.

Paul
 

rincewind_wizzard

Registered User.
Local time
Today, 01:20
Joined
Feb 7, 2018
Messages
23
I've put that in the both the control, and then the row source for the second combo box (named the first one cboBox1), but no joy. Tried it with an = before the statement, and without
 

Minty

AWF VIP
Local time
Today, 01:20
Joined
Jul 26, 2013
Messages
10,371
On the combo there is an 3rd option for the row source type - FieldList.
So if you changed the rowsource in cboBox2 to the name of the query in the afterupdate of cboBox1 and had that setting , I think Bob would be your uncle.
 

rincewind_wizzard

Registered User.
Local time
Today, 01:20
Joined
Feb 7, 2018
Messages
23
Cheers guys, I got it to work by putting this in the on enter event of ComboBox2

Me!ComboBox2.RowSource = Me!ComboBox1.Value
 

Users who are viewing this thread

Top Bottom