Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox default to first field

Status
Not open for further replies.

gcole

Programmer
Aug 2, 2000
390
US
I have a combobox based on a table with 1 populated record. I want the value to be the default when a new record appears on the form.
 
In the form's design view, select the combo box and look at the Data properties - there will be a "Default value" property which you can set to the required value.
 
Hello Gcole

I think you'll need something like this :

combo.DefaultValue = combo.ItemData(0)
This shows the first element in your combobox as the default value.

Kind regards
Borg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top