Field Display in Combo Boxes

C

Carl J. Hixon

Here's one for everybody...

I have a combobox on a form. I am using a query as the row source. The
query links to a table both display 3 columns (key, grade, tuition). I use
bound column 1 because I only want to store the key in my form record. In
the combo box, I format the columns (0.2", 1",0") so that the grade can be
seen. BUT, once the selection is made the combobox only displays the key
because this is what I have bound. I want to bind the key but show grade
after the selection for user friendliness.

Am I going about this the wrong way?

Thanks,
Carl
 
V

Van T. Dinh

Set the ColumnWidths Property to 0", 1", 0".

The width of the first column must be zero (0), NOT 0.2 or even 0.001
 
B

Blaire Comrie

Columns = 2
Dound column = 1
Column widths = 0";2"
In the Query behind add the values together in column 2 IE
Column 1 = [Key]
Column 2 = Display: CStr([Key]) & " " & CStr([Grade]) & " "
CStr(Format([Tuition],"Currency"))
 
K

Ken Snell

The combo box will display the first visible column. If you want to show
both the key and grade in the dropdown list, then reverse the order of the
two fields in the row source query (have grade first, then key, then
tuition), then change the bound column to 2 so that the key is still the
value of the combo box even though grade will show in the box after the
selection is made.

If you don't need the key to show in the dropdown list, then keep the field
order the same, keep the bound column as 1, and change the list widths
property to this:

0"; 1"; 0"
 
C

Carl J. Hixon

Got it! Thanks everybody. I can't believe that I forgot that tidbit of
information!!

Carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top