Combo Rowlist

T

Tony

I have a combo box which is unbound to any field on the
form, but I have a SQL statement to create a value for
that combox.

My problem is how can I make my first value on my combo
box show up without clicking on dropdown list.

Thanks in advance,
Tony
 
G

Graham Mandeno

Hi Tony

Set the DefaultValue of the combo to:
[Name of combo].[ItemData](0)

If you ever want to set the value back to the default, for example in
Form_Current or Form_BeforeInsert, use this code:
With Me.[Name of combo]
.Value = .ItemData(0)
End With

If the combo has headers then use .ItemData(1)
 

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

Similar Threads

Combo box 0
COMBO BOX vs Uppercase 6
Combo boxes in excel 6
Combo or list box 0
How can I make my select statement include two statements 3
Split form 0
Combo box Selection 0
Filling a combo box at form start 3

Top