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!

Automatic Update of Combo Box on Form

Status
Not open for further replies.

BuckyBaby

Technical User
Sep 23, 2000
8
US
Hopefully an easy question,

In my main table, I have combo box that every so often I manually update by addding new options in the ROW SOURCE properties line. I have made a data entry form for this table, but when I update the combo box in the table, the new entry does not show up in the linked combo box in the form - only if I remake the form does it update. Do I need to write something in the "After Open" or After Update event procedures??

Thanks,
BuckyBaby [sig][/sig]
 
I may not understand your set up exactly, Did you create the table field as a [sig]<p>Dave<br><a href=mailto:gallagherd@earthlink.net>gallagherd@earthlink.net</a><br>[/sig]
 
I may not understand your set up exactly, Did you create the table field as a &quot;look up&quot; type ? Im not sure I know what you mean by remake the form. Im assuming the choice in the combo box is being saved to a field in a table (ie this is a bound bombo box).

Normally I create a combo box on the form. If it is static data I want in the list, then I enter a list of values in the row source property of the combo box control on the form with values in quotes, separated by semicolons(&quot;Yes&quot;;&quot;NO&quot;;&quot;Maybe&quot;;&quot;Who Knows&quot;). This value list should update imediately when changed.

If it is dynamic data I set the row source to a field in a table or query (for example a list of current part numbers). In this way you can enter new choices through a maintenence form of some type, or simply list existing data in a table in your combobox if that is appropriate. Combo boxes based on tables or querys need to be requeried after the underlying table is edited. Either by reopening the form, or trigering a requery action in an event.

Either way creating the combo box on your form with the wizzards turned on in the toolbox should get you where you want to go. If this doesnt help, please repost your question with the name of the table and its pertinent fields, the name of the form, the name of the combo box on the form, and an example of the choices you would like.

You can look at the northwind samples database forms for examples of implementing combo boxes.

Hope this helps some. [sig]<p>Dave<br><a href=mailto:gallagherd@earthlink.net>gallagherd@earthlink.net</a><br>[/sig]
 
Your problem is correct. Access will not recognise your changes to the value list you make at the table design level. DaveSH is right in his example related to using the combo box control on the form. One of the problems with combo boxes designed in the table is, you need to delete the combo box from every form where you use the combo box and then replace it to get at the new values. The solution I use is to make a table, even if it only has one field in it and use it as the row source for your combo box. If you need to add a new selection, just open the table and type it in. Every form where you use this same combo box has access to the new value. [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top