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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setfocus on form load 1

Status
Not open for further replies.

cctrinh

MIS
Feb 2, 2001
25
US
How do you display a value in a combo box when the form load? Any assistance will be appreciate.

Calvin
 
Calvin,

If you want to default values for a new record only, you can use the Default Value property of the combo box.

If you always want to default values you could write code such as the following:

Private Sub Form_Load()
Me!MyComboName = "Default value"
End Sub

Hope this helps,
Mickey
 
Here's another way to fill that combo box:
In "default data" in the properties of the combo box enter
[NameOfYourComboBox].[ItemData](0). It will make the first choice (whether from a value list or table or ?) show up when you open the table. At least it does in my forms. Now, where did I learn that? Could it have been on tek-tips?
Good luck. :)
padregus@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top