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

reset combobox value to default

Status
Not open for further replies.

simian336

Programmer
Sep 16, 2009
723
US
I have several comboboxes on a form. Once I insert my current fields in the table I need to reset the comboboxes to their default values so the user can process the next entry.

I tried

Me.EMPLOYEE_ID.Value = Me.EMPLOYEE_ID.DefaultValue

but that just makes it equal to "Me.EMPLOYEE_ID.DefaultValue"

Thanks for the help!

Simi
 
Should have mentioned that the comboboxes are based on a query and the default value is set like [PERFORMED_BY].ItemData(0)

Simi
 
Not sure if I did it the most efficient way but I created public variables. Then I saved the defaultvalue to the public variable on form load. Then on update I reset the value to the public variable.

Simi

 
I'm sort of lost. You're using a form to input data to a table, right? Once you've entered whatever data you want to the form (and through it to the table), all you should need to do is go to a new record and the default values will reappear.

What's the problem? Why do you have to reset anything?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top