Display Text in Combo Box

JamesJoey

Registered User.
Local time
Today, 17:26
Joined
Dec 6, 2010
Messages
628
I have a comb o box I use to open forms based on a selection in the combo box. It's based on a table.

I'd like to have a row in the combo box display something like "Please Make a Selection" prior to making a selection and returning to that row after making a selection.

Any Ideas how I might accomplish this?
James
 
you cant really add text to a combo if its not part of the dataset.
you can add it to the table where the cbo gets its data ,and set the combo to be this as DEFAULT VALUE.

you dont REALLY need to put that message in it anyway, a combo box is inherently telling you to pick something without being told to.
 
In the properties of the combo box, set the Default Value: ="Please Make a Selection"

Once the user clicks on the dropdown and selects something, the "Please Make a Selection" will no longer show.
 
I can always placed a label next top the combo box.

Thanks,
James
 
i think it is possible not very good to look.
modify your combo's rowsource to:

select [FieldToShowInCombo] From table1 Union Select " Please Make A Selection" From table1

now add code to your combo's AfterUpdate Event:

Private Sub combo_AfterUpdate()
me.combo.RowSource="Select [FieldToShowInCombo] From table1;"
End Sub

you want the " Please Make ..." to show first when the form opens,
so add code to your Form's Load event:

Private Sub Form_Load()
Me.Combo.Value = Me.Combo.ItemData(0)
Me.Combo.SetFocus
End Sub
 

Users who are viewing this thread

Back
Top Bottom