ComboBox display

G

Guest

I have 2 questions regarding displaying data on my form.

1. I have a combo box that allows the user to enter items not on the list.
Some of the items entered are longer than I have space to display on the form
(they typed in an item with 50 characters but I only have room on the form to
display the first 25.). The user is requesting some way to see the whole
line. Is there some way to allow the user to hover over the control and have
it display the whole line.

2. My form has a button that displays a popup form allows the user to
assign a customer to that line of data. I am using a form because it has to
return to the user a msgbox if certain criteria exists to ensure they want to
use this customer. Since the customer is being stored by customerid in my
detail table, I am returning the information into a combo box with the id
field hidded. The users now want the arrow of the combo box to be removed.
since the data is bound to the form, how can I have the functionality of the
columns of a combo box without using a combo box?
 
K

Ken Snell \(MVP\)

Rickety107 said:
I have 2 questions regarding displaying data on my form.

1. I have a combo box that allows the user to enter items not on the
list.
Some of the items entered are longer than I have space to display on the
form
(they typed in an item with 50 characters but I only have room on the form
to
display the first 25.). The user is requesting some way to see the whole
line. Is there some way to allow the user to hover over the control and
have
it display the whole line.

You can use the AfterUpdate event of the combo box to write the full text
string for the "selected" item in the combo box into the ControlTipText
property of the combo box. Note that, if you programmatically change the
value in the combo box that is "selected", this AfterUpdate event will not
occur; you'd need to call it (or run same code that you'd put in its event
procedure) as part of the program that you are running.

2. My form has a button that displays a popup form allows the user to
assign a customer to that line of data. I am using a form because it has
to
return to the user a msgbox if certain criteria exists to ensure they want
to
use this customer. Since the customer is being stored by customerid in my
detail table, I am returning the information into a combo box with the id
field hidded. The users now want the arrow of the combo box to be
removed.
since the data is bound to the form, how can I have the functionality of
the
columns of a combo box without using a combo box?

You can't. So use a combo box and put a Box control on top of the dropdown
arrow at the right side of the combo box to cover it. And you'll probably
need to use the KeyPress event to trap any attempt by user to use the
keyboard shortcut for dropping down the combo box list.

Or use a textbox to display the "first visible column" that the combo box
would show, and put the ID field's value in a hidden textbox on the form.
 

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