Combo Box Watermark?

  • Thread starter evilcowstare via AccessMonster.com
  • Start date
E

evilcowstare via AccessMonster.com

Hello!
Is it possible with a combo box to have some txt in it that will say what its
for, which goes when something is selected, so kind of like a watermark.
So you open a form, inside the combo might say "select the name... " which is
there until something is selected.
I tried using Default Value but it doesnt like it, im guessing because Select
the name isnt an entry for where the combo gets its info from, so is there
another way to do it???

Thank You !
 
M

Mr B

Although you cannot do what you want to do in your combo box, you can created
a label (use the Format/Move to Front menu option to make sure it is on top
of the combo box). Place the label over the combo box. Put the text you
want to display in the label. Have this label to be shorter than your combo
box because you will not be able to select the combo box if the label
completely covers it. When you select the combo box, the combo box will
cover the label and a selection can be made from the combo box.

In the After Update event of the combo box, place the following code:

If Not IsNull(Me.cboSelectColor) Then
Me.NameOfYourLabel.Visible = False
Else
Me.NameOfYourLabel.Visible = True
End If

You should also place this same code in the OnCurrent event of your form.

This is just a "work-a-round" but it can provide the type of interface you
are looking for.

--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com
 
E

evilcowstare via AccessMonster.com

Hi Mr B
Thanks Very much, I thought a way round might be something like that, just
didnt know if there was an actual option.

Thanks again
Jay

Mr said:
Although you cannot do what you want to do in your combo box, you can created
a label (use the Format/Move to Front menu option to make sure it is on top
of the combo box). Place the label over the combo box. Put the text you
want to display in the label. Have this label to be shorter than your combo
box because you will not be able to select the combo box if the label
completely covers it. When you select the combo box, the combo box will
cover the label and a selection can be made from the combo box.

In the After Update event of the combo box, place the following code:

If Not IsNull(Me.cboSelectColor) Then
Me.NameOfYourLabel.Visible = False
Else
Me.NameOfYourLabel.Visible = True
End If

You should also place this same code in the OnCurrent event of your form.

This is just a "work-a-round" but it can provide the type of interface you
are looking for.
Hello!
Is it possible with a combo box to have some txt in it that will say what its
[quoted text clipped - 6 lines]
Thank You !
 
M

Mr B

Hi, Jay.

Glad to help.

Sometimes the only option is some kind of improvision. If it works ... ;>)

--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com


evilcowstare via AccessMonster.com said:
Hi Mr B
Thanks Very much, I thought a way round might be something like that, just
didnt know if there was an actual option.

Thanks again
Jay

Mr said:
Although you cannot do what you want to do in your combo box, you can created
a label (use the Format/Move to Front menu option to make sure it is on top
of the combo box). Place the label over the combo box. Put the text you
want to display in the label. Have this label to be shorter than your combo
box because you will not be able to select the combo box if the label
completely covers it. When you select the combo box, the combo box will
cover the label and a selection can be made from the combo box.

In the After Update event of the combo box, place the following code:

If Not IsNull(Me.cboSelectColor) Then
Me.NameOfYourLabel.Visible = False
Else
Me.NameOfYourLabel.Visible = True
End If

You should also place this same code in the OnCurrent event of your form.

This is just a "work-a-round" but it can provide the type of interface you
are looking for.
Hello!
Is it possible with a combo box to have some txt in it that will say what its
[quoted text clipped - 6 lines]
Thank You !
 
Top