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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate Combo box with Field names from Table selected in another Com

Status
Not open for further replies.

DanScott

Programmer
Sep 13, 2002
14
US
I found thread 702-796789 that was exactly my problem, but I could not get the solution to work. Here is my problem in detail

I have a form that has (for now) two combo boxes, one that I have been able to list my current tables less msys tables.

Now I want to list the fields for the table listed in the first combo box in the next combo box.

Sounds easy enough, but I'm stumped.
 
And what is the problem with the code posted in Thread702-796789 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi!

In the first combos after update event, set the rowsource of the second combo to the selected table. For instance, if the first combo contains only one column (or the table name is at least the bound column):

[tt]me("combo2").rowsource=me("combo1").value[/tt]

Then in the second combo, set the Row Source Type to Field List

Roy-Vidar
 
That was very simple. Thank you very much. Works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top