Combo Box Default Value

crhodus

Registered User.
Local time
Today, 03:19
Joined
Mar 16, 2001
Messages
257
This should be easy, but I can't seem to figure out how to do this or find an answer.

I have a combo box that I have manually entered data into the Row Source property. I want the first item in this list to be selected whenever the form is loaded. What do I need to add to the Default Value property?

Thanks!
 
Doesn't really matter, use

Me.ComboName.Value = Me.ComboName.ItemData(0)

on the form_load() event
 
I tried adding Me.cbOrder1.Value = Me.cbOrder1.ItemData(0)
to the On Load property for the form but I received a message:

"EIB system (this is the name of my program) can't find the macro 'Me.' The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved. Note that when you enter the macrogroupname.macroname syntax in an argument, you must specify the name the macro's macro group was last saved under."

BTW I am not using a primary key in the combobox.
 
I finally figured out what I was doing wrong. I was not adding the code to the VB part.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom