Full Version: Display correct value in dropdown
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
Jackalope
Hi

I have a dropdown menu which has two columns, the first column numeric and the second text. I need both of these to display for the user to make a decision; however, at the moment, the numeric value stays in the dropdown after the user has made a choice and I'd like the second column, the text, to stay. This looks like it should be very simple but I can't work it out.

Any ideas?

Thanks

Mark
RuralGuy
Reverse the order of selection in the SQL. Then change your bound column. When collapsed, a combobox shows the 1st visible column.
Jackalope
Thanks RG, works just as needed sad.gif

Mark
R. Hicks
See the attached example ...

RDH
R. Hicks
That also reverses the way they are displayed in the drop down list ...
See my example to retain the original display order ...

RDH
Jackalope
Hi Ricky

Yep, works great, unfortunately, I can't see how you've done it...... sad.gif

Is it the fact that you've used the ID twice and centered the viewed column?





Edited by: marknorton on Sun Jul 30 20:39:19 EDT 2006.
R. Hicks
I placed value to be displayed as the first column in the Row Source query ...
Then I set the column width for the first column to a value small enough to effectively make it not appear in the drop down list (0.0007") ...
The first "visible" column is what displays once the choice has been selected ...
You just need to set the Bound Coumn to the correct column if this combo is bound to a field in the table.
So if you are storing the numeric ID value .. you set teh Bound Coumn property to 2 ....

RDH
Jackalope
Thanks Ricky, that makes perfect sense.

Mark.
R. Hicks
No problem .. you are welcome .. wink.gif

RDH
RuralGuy
Glad I could help Mark.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.