Combo box display different than what's going in Record

Ethereal

Warcraft III Player
Local time
Today, 05:31
Joined
Jan 17, 2006
Messages
99
I have created a combo box that simulates browsing, but limits it to a single filepath. I would like to store this file path along with the filename into my database in a field. There are two ways of doing this that I have found work, but i need a less cluttered way.
1) My rowsource string is created by
rowString = rowString & filePath & fileName &";"
fileName = dir

that's in a loop that reads all the files in the directory.... the problem with setting this rowsource to my combobox is that its very long and cluttered looking combo box

My secont way is:
rowString = rowString & fileName &";"
fileName = dir

Then i make a hidden text box whose value is filePath + Me!cboBox where the cboBox has the string value of the file (Sample1.jpg) In this instance i make the text box the control source instead of the combo box... but I'm pretty sure that's a bad way of doing what I want to do

both of these ways seem ... redundant, so i was wondering if there is a way to do this otherwise ?
 
Last edited:
I don't fully understand what you are doing. However, you can have columns in your combo that are invisible to the user by setting the column width to zero. This way you can display something short and neat to the user, but the full nasty stuff is there in another column.

Does that help?
 
Well i know how to do this when i get my values from a table/query, but i am specifying my rowsource in VB, since the rowsource is a filelist... so how do i specify multiple columns for rowsource in the VB code?
 

Users who are viewing this thread

Back
Top Bottom