Reference Column in Union Query

mrssevans

Registered User.
Local time
Today, 08:33
Joined
Nov 15, 2001
Messages
190
I have a combo box that pulls from a union query that only has 2 columns. I set the bound column as 2 because I want the 2nd column to show in the field. No matter what I do it will only show the first column. Please advise.
 
The "Column Width" property of your combo box has "o" values in it.
 
Thank you very much for the reply but I had the combo box column width set at .5";.5"
I have tried numerous changes to the combo box wondering if that was the issue, but no matter what I do the 2nd column won't show.
 
There are 3 properties you must set:

[on data tab]
BoundColumn=2

[on formatting tab]
Number of Columns=2
ColumnWidths=0,.5

that should allow you to display the 2nd column and bind the combobox to it. Note that the bound column is what is actually saved in data, the formatting determines what is displayed.

HTH
 
Last edited:
Please don't. I had to ask that one more than once! :D
 
Now it's my turn....

I just realized that you're about to get an error saying that the bound column doesn't match the 1st displayed [or similar] the answer is to change the column order in your query.
 
mrssevans said:
I set the bound column as 2 because I want the 2nd column to show in the field.

The bound column has no effect on the column you see, it merely sets which column the combo box refers to when you ask for its value (i.e. column 1 = A, column 2 = B, if bound column = 2 then combobox.value = B).

If you only want to see the second column in the combo box, then set the column widths to 0cm;2cm (or whatever), making sure the column count property is set to 2.

HTH,

Matt.
 
Woah! Walked away half way through typing my answer and now I've been beaten to it!!:D
 

Users who are viewing this thread

Back
Top Bottom