List Box Problem

  • Thread starter Thread starter Anthony Webb
  • Start date Start date
A

Anthony Webb

Hi all,

Not sure how to word this so please bare with me.

I have a form which has a field which uses the lookup
wizard to find a value from another table. The table
where the lookup field gets its information from has two
fields (code and description). When i select a value from
my lookup field, it stores the code as the value to my
underlying table which is what i want.

On my main form i have a list box which has five fields.
One of these fields is my lookup field and on my list box
shows me the code.

However i would like to be able to see the description on
my list box instead of the code.

Is this possible and if so can somebody please explain how.

Thanks for any help everyone.

Anthony
 
Hi Anthony,

Both the listbox and combo box controls have a property named ColumnWdths
which is a semicolon delimited list of widths. Just put a zero in the list
in the position that corresponds with the column you wish to hide. For
example, to hide the first of 4 columns:

0";0.5";0.8";0.6"
 
Thanks for replying Sandra.

I understand what your saying but the problem i'm having
is it is only showing the first column of my lookup field
in my list box so hiding it would do nothing.

On a form when i want to show the second column of the
field i put in the control source of =type_lpg.column(1).

I think i need something similar in my list box but am
unsure of what.

Thanks

Anthony
-----Original Message-----
Hi Anthony,

Both the listbox and combo box controls have a property named ColumnWdths
which is a semicolon delimited list of widths. Just put a zero in the list
in the position that corresponds with the column you wish to hide. For
example, to hide the first of 4 columns:

0";0.5";0.8";0.6"


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Anthony said:
Hi all,

Not sure how to word this so please bare with me.

I have a form which has a field which uses the lookup
wizard to find a value from another table. The table
where the lookup field gets its information from has two
fields (code and description). When i select a value from
my lookup field, it stores the code as the value to my
underlying table which is what i want.

On my main form i have a list box which has five fields.
One of these fields is my lookup field and on my list box
shows me the code.

However i would like to be able to see the description on
my list box instead of the code.

Is this possible and if so can somebody please explain how.

Thanks for any help everyone.

Anthony

.
 
Back
Top