Drop down combo box

  • Thread starter CharlesCount via AccessMonster.com
  • Start date
C

CharlesCount via AccessMonster.com

I have a drop down combo box listing codes and the table for the codes has 2
fields one for the codes and one for the codes definition. I would like to
see both column in the form but keep the code field only 4 caracters wide,
can it be done?
Thanks
Charles
 
D

Douglas J. Steele

The only time you can see more than one column in a combo box is when the
combo is dropped.

To see more than one piece of information, you could create a field that
concatenates the two fields into one and display that concatenated field.
 
C

CharlesCount via AccessMonster.com

Yes I understand that and it works fine, the only problem is that in order to
see both column I have to make the filed wider than it is required and I
wonder if it is possbile to see both column at the same time when the field
is only 4 caracter wide but the second column that woould be used as
reference is 3 inches wide

Thanks
The only time you can see more than one column in a combo box is when the
combo is dropped.

To see more than one piece of information, you could create a field that
concatenates the two fields into one and display that concatenated field.
I have a drop down combo box listing codes and the table for the codes has
2
[quoted text clipped - 3 lines]
Thanks
Charles
 
D

Douglas J. Steele

I'm sorry, I don't understand what you're saying.

If you concatenate the fields into a single field for display purposes, you
can ensure that you've got 4 characters, followed by a space, followed by
the contents of the second column.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


CharlesCount via AccessMonster.com said:
Yes I understand that and it works fine, the only problem is that in order
to
see both column I have to make the filed wider than it is required and I
wonder if it is possbile to see both column at the same time when the
field
is only 4 caracter wide but the second column that woould be used as
reference is 3 inches wide

Thanks
The only time you can see more than one column in a combo box is when the
combo is dropped.

To see more than one piece of information, you could create a field that
concatenates the two fields into one and display that concatenated field.
I have a drop down combo box listing codes and the table for the codes
has
2
[quoted text clipped - 3 lines]
Thanks
Charles
 
S

Scott Konkle

Charles,

I think I'm encountering the same problem if I'm follwoing what your trying
to do. The issue is that the dropdown for the combo box is only as wide as
the combo box itself. That makes sense in most cases until you try to use
multiple columns in the combo box where the shorter column is displayed, a 4
character code and a description of that code for instance. Showing the
combo box at a width that will accomodate the 4 digit code and the
description in the drop down looks stupid on the form as it wastes a large
amount of space when the combo is closed. Showing it only 4 characters wide
makes you have to scroll the dropdown horizontally which is not at all
userfriendly.

Unable to find a solution I've been trying out some code that changes the
widths of the combo box when the dropdown opens. Since there is no
"OnDropDownOpen" or "OnDropDownClose" event doing this is tricky and
complicated. The display is also buggy as after I've widened the column and
all the code has finished and the drop down is open Access insists on
redrawing the dropdown arrow at the original location, though this arrow
won't work and will disapear if you try to use it.

I'd be interested to hear if you've found a method that worked or I could
share details about how my method "works" if you haven't found anything
better.

Scott



Douglas J. Steele said:
I'm sorry, I don't understand what you're saying.

If you concatenate the fields into a single field for display purposes, you
can ensure that you've got 4 characters, followed by a space, followed by
the contents of the second column.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


CharlesCount via AccessMonster.com said:
Yes I understand that and it works fine, the only problem is that in order
to
see both column I have to make the filed wider than it is required and I
wonder if it is possbile to see both column at the same time when the
field
is only 4 caracter wide but the second column that woould be used as
reference is 3 inches wide

Thanks
The only time you can see more than one column in a combo box is when the
combo is dropped.

To see more than one piece of information, you could create a field that
concatenates the two fields into one and display that concatenated field.

I have a drop down combo box listing codes and the table for the codes
has
2
[quoted text clipped - 3 lines]
Thanks
Charles
 
D

Dirk Goldgar

Scott Konkle said:
Charles,

I think I'm encountering the same problem if I'm follwoing what your
trying
to do. The issue is that the dropdown for the combo box is only as wide as
the combo box itself. That makes sense in most cases until you try to use
multiple columns in the combo box where the shorter column is displayed, a
4
character code and a description of that code for instance. Showing the
combo box at a width that will accomodate the 4 digit code and the
description in the drop down looks stupid on the form as it wastes a large
amount of space when the combo is closed. Showing it only 4 characters
wide
makes you have to scroll the dropdown horizontally which is not at all
userfriendly.

Unable to find a solution I've been trying out some code that changes the
widths of the combo box when the dropdown opens. Since there is no
"OnDropDownOpen" or "OnDropDownClose" event doing this is tricky and
complicated. The display is also buggy as after I've widened the column
and
all the code has finished and the drop down is open Access insists on
redrawing the dropdown arrow at the original location, though this arrow
won't work and will disapear if you try to use it.

I'd be interested to hear if you've found a method that worked or I could
share details about how my method "works" if you haven't found anything
better.


Scott, Charles, are you aware of the ListWidth property of the combo box
control? It's on the Format tab of the control's property sheet. Although
the default is "Auto", limiting the dropdown list to the width of the
control, you can set it to any width you please.
 
C

CharlesCount via AccessMonster.com

Incredible, it works like magic.
Thank you, Thank you.

Charles


Dirk said:
[quoted text clipped - 24 lines]
share details about how my method "works" if you haven't found anything
better.

Scott, Charles, are you aware of the ListWidth property of the combo box
control? It's on the Format tab of the control's property sheet. Although
the default is "Auto", limiting the dropdown list to the width of the
control, you can set it to any width you please.
 
S

Scott Konkle

Dirk,

I didn't see that one. I had a feeling it was something simple I was missing
but it was a good learning experience doing it manually anyway.

THANK YOU!

Scott
 

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