listbox formatting

B

bkrasnof

Hi, I'm using access2003 and I have a listbox on a form. When I expand
the listbox it displays nicely....bound to column 1, but displays colum
2.

But before it's expanded the listbox always displays the bound column,
column 1, even though I have set the width to 0".

Is there a way I can have it display column 2 in both 'modes'?

thanks,
Bruce
 
T

tina

sounds like you're talking about a combo box control, not a listbox control.
a combo box control shows the "droplist" only when you click the arrow
button at its' right edge, or press F4, while the listbox is "open" all the
time.

the behavior you're describing sounds strange, though. if the ColumnCount
property is set correctly, and the BoundColumn property too, and the
ColumnWidths property has a width for every column, starting with
0"
for the first (and bound) column, then the control should show the value in
the second column whether the droplist is open or not.

is the control bound to a field in the form's underlying table - in other
words, is there a field name in the control's ControlSource property? if
not, is there *anything* in the ControlSource property? is there a value in
the control's DefaultValue property? if the control is bound to a field,
then is that field a Lookup field in the table? if so, get rid of the Lookup
at the table level (for more information, see
http://home.att.net/~california.db/tips.html#aTip8).

hth
 
B

bkrasnof

Hi Tina,

Yes, I tried combobox and it worked fine, the way I expected.

I did have a controlsource set to a field in the table, but it wasn't a
lookup field. I've avoiding those.

I'll use combobox for now, just seems like it might be an obscure
listbox bug, or more likely something I'm doing wrong :)

But the same configuration worked fine with a combobox.

-Bruce
 

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