Article ID: 268012 - Last Review: June 23, 2005 - Revision: 3.0 ACC2000: How to Add a Record to a Dropdown List on a Data Access PageThis article was previously published under Q268012 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp). SUMMARY
On a form, you can use the NotInList event of a combo box to add records to an underlying table. This article describes how to use the HTML dropdown list control to simulate this functionality on a data access page. This article uses the showModalDialog method of the Document Object Model (DOM) of Microsoft Internet Explorer to open a child window and the ServerFilter property of a RecordsetDef object for the data source control on the page.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Dropdown list controls on data access pages are implemented with the HTML SELECT tag, which does not support entering new values as do combo boxes on Access forms. You can, however, use a second page to add a value to the record source for the dropdown list. This example consists of a products page that has a button to add a new category on a second page. CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database. Creating the First Page
Creating the Second Page
REFERENCESFor additional information about using the NotInList event in an Access form, click the article number below
to view the article in the Microsoft Knowledge Base:
197526
(http://support.microsoft.com/kb/197526/EN-US/
)
ACC2000: Use NotInList Event to Add a Record to Combo Box
For additional information about how to create data entry data access pages, click the article number below
to view the article in the Microsoft Knowledge Base:
262453
(http://support.microsoft.com/kb/262453/EN-US/
)
ACC2000: How to Create a Data Access Page to Open to New Records Only
| Article Translations
|
Back to the top
