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!

Grid Combo Box Problem

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I have a grid tied to a table(#1). There is a field in the table(#1) that contains a key to another table(#2) holding a description. I have set up a relation between these two tables on the key and changed the column source on one of the columns to the description field in table #2. I have added a combo box control to the column with its control source set to the key field in table #1 and the row source to table #2 opened with another alias. I have also set up the dynamic control to only use the combo when in the edit mode. When the combo box is not visible (not in edit mode) the grid displays properly with the description from table #2. After selecting an item in the combo box, the value in the grid is the key from table #2, not the description from table #2. Is there a way to do this, or should I re think my approach? What I'm trying to do is display the description from table #2 in a column but allow the user to select the value based on the key in table #2. I hope I have explained this well enough for somebody to understand what I'm trying to do.

Auguy
Northwest Ohio
 
you should not try to mix the controls. bind the grid column to the foreign key field, use the combobox as you have it and set sparse to .f. in that column to have a combobox in every row.

Bye, Olaf.
 
Thanks Olaf. I thought I tried that combination, but I will revisit and try again.

Auguy
Northwest Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top