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

Help: Forms Combo Box Storing Data

Status
Not open for further replies.

RDMRDM

Programmer
Apr 9, 2007
33
0
0
US
I have a form with a combo box drop down for the users to select which field they want. My drop down has 5 columns that allows the users to decide which field they want. I use 5 to give more description. My problem is, it appears I am only able to store just one of the columns in the table. I would like to write all 5 columns to each their own field in the table. Can this be done? Here is the code from the field Row Source in the combo box on the form. I currently have column 2 bound so its only storing the field "Job".

SELECT Item_Job_List.[Job Description], Item_Job_List.Job, Item_Job_List.[Job category Description], Item_Job_List.[Position Description], Item_Job_List.[Employee Group Text] FROM Item_Job_List ORDER BY [Job], [Job Description], [Employee Group Text];
 
to access the non-bound columns on a combo box or list box, use the .column(colIdx, rowIdx) method, F1 for more details...

--------------------
Procrastinate Now!
 
I am able to see all 5 columns in the drop down combo box, however, when I select 1 row of data, it is only writing the 1 field to the table. I would like to be able to write all 5 fields to the table. Sorry for asking for extra clarification. I used the search F1 function and I couldn't find any info on that. Thanks.
 
you have to include the other 4 columns into your insert code, so if you use an insert statement with runsql, then you need to modify your insert statement, or if you use a recordset, then you need to modify the other 4 columns in the recordset...

--------------------
Procrastinate Now!
 
Thanks for the info. Sorry, I am not following your instructions. You might be speaking over my knowledge level. I just have the list box where it displays 5 columns of data. I just want to write all 5 columns of data to the table based on what row of information the user selects. My code in my Combo Box "Row Source" field is SELECT Item_Job_List.[Job Description], Item_Job_List.Job, Item_Job_List.[Job category Description], Item_Job_List.[Position Description], Item_Job_List.[Employee Group Text] FROM Item_Job_List ORDER BY [Job], [Job Description], [Employee Group Text];

Thanks again for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top