The following sections show how to use the customer forms and how to program it. The object names are provided so you can easily examine them in the Northwind 2.0 Starter Edition database.
The main menu (frmMainMenu) uses frmCustomerList to display all customers. In Northwind, most list forms open as a subform from the main menu. But the frmCustomerList form opens in a tab of its own. Because the frmCustomerList form is a split form, it can’t be a subform, and can open only as a form.
Split forms and datasheets are very similar to Excel. You can filter and sort, show/hide fields, total columns, and move columns around. When you open a table or a query, the data is presented to you as a datasheet. A split form looks like a datasheet but also has a form header and footer sections. Header and footer sections allow you to have command buttons, images, text labels and other access form controls you want to help improve the user’s experience. For more information, see Introduction to forms and Create a split form.
This customer List form (frmCustomerList) has four actions you can take:
-
Show/Hide fields A dialog box opens with a list of all available fields and the end user can check or uncheck those to alter the data presented. The layout will persist from one session to another for the end user until a new version is deployed. For more information, see Show or hide columns in a datasheet.
-
Create labels Opens the Label Wizard from Access. For more information, see Create mailing labels in Access.
-
Add a new customer Open the customer detail form (frmCustomerDetail) so you can add a new customer.
-
Select an ID Click the ID field, which is a hyperlink, to open the customer detail form to the selected customer.
The customer detail form (frmCustomerDetail) highlights the following Access features:
-
Using the GoToRecord Macro Action to add a new customer.
-
Using the OpenArgs Property of the form to enable a new customer to be added when taking an order.