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

Add New Record to Combo box

Status
Not open for further replies.

Fish521

Technical User
Nov 3, 2005
29
US
I have a form for people to request a class on. I have the classes listed in a table which is set up as a combo box on the form. How do I allow them to choose a class from the combo box but also if the class they are looking for is not in the combo box allow them to type in the class they are requesting.
 
There is a property called Limit to List. Set that to No.
 
In Design view of your form, click on the combobox, bring up it's property sheet (the button near the top right with the hand on it). Click on the ALL tab, scroll down to the option Limit To List and change it to NO. Also, you may want to click on the Event tab, click the box next to AfterUpdate. A button with three dots will appear. Click on it and click on Code Builder Add the following code:(the Private Sub and End Sub will already be there)

Private Sub city_AfterUpdate()
Me![Class].Requery
Me![The Next Control Name].SetFocus
End Sub

This will update the combobox and set the cursor to the next field you specify.
 
Thanks for all the help. It works great now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top