Can I add text to combo box as message?

A

Aaron G

Using Access 2003 - I have a combo box that works fine. However, I would
like to add some text in it as a message for users to click there (ala the
"Type a contact to find" combo box in Outlook 2003).

Is this possible in Access?

TIA

Aaron G
Philadelphia, PA
 
K

Klatuu

Use the ControlTip Text property of your combo box. The text in the property
will show in a little yellow box when you position the mouse over it.
 
A

Aaron G

Klatuu,

Thanks for the response. I'm looking for something that will draw the users
eyes there without having to mouse over. I'm going for a really clean look
and don't have a "Seach" label attached either.

Can I put some kind of text in that will disappear when you click on it and
won't effect my after update event?

Thanks again.

Aaron G
Philadelphia, PA
 
K

Klatuu

I'm not sure what you are asking for. What do you mean by "Search" label?
If you mean you want text in the combo where the list of options is, it can
be done with a value list, but you would have to deal with it
programmatically.
It may be easier to create a label and position it just above the combo,
then make it invisible when the user selects from the combo. You would also
have to use the Current event of the form to make in visible for the next
record.
 
D

Dirk Goldgar

Aaron G said:
Using Access 2003 - I have a combo box that works fine. However, I
would like to add some text in it as a message for users to click
there (ala the "Type a contact to find" combo box in Outlook 2003).

Is this possible in Access?

It seems to me this is very similar to the often-asked question of "how
to add '(all)' to a combo box". So the approach described here:

http://www.mvps.org/access/forms/frm0043.htm
Forms: Adding "All" to a listbox or combobox

could be adapted to your needs. If you use Null as the bound-column
value corresponding to your message text, then your AfterUpdate code can
just verify that the combo box value isn't Null before charging off to
find the record the user selected.
 
G

George Nicholson

One approach might be to create a label or unbound textbox with your message
that sits *exactly* on top of your bound combobox. When the unbound textbox
is clicked, give the bound combobox the focus (sending the unbound textbox
"to back").

Not sure from your post if you would ever want to give focus to the unbound
control again much less when you would want that to happen. It sounds like
you only want this for an "initial use" view when an empty form first opens.

HTH,
 
A

Aaron G

Dirk,

Thanks for the post. I think I'm going to go with George's solution just
for simplicity's sake, but it looks as if this would solve the problem as
well.

Thanks.

Aaron G
Philadelphia, PA
 
Top