14.3. Building the User Interface

Let's create the empty forms for the user interface. You will then write the code in class modules and standard modules, and finish off by adding code to each form to call the class modules and standard modules.

Try It Out: Building the frmSearch and frmCustomers Forms

Let's create the two forms that will be used by the application.

  1. Create a new form called frmSearch. Open the form in Design View. Next, drag the numerous controls onto the form and resize them, as shown in Figure 14-20.

  2. The following table will help ensure you have all the correct objects on the form. Rename the controls and change other properties for each object as shown in the following table. If you placed items on the form in a different order than described, your column default names may not match with the exact numbers shown below.

    Default Name on Figure 14-20NameType of ControlOther Properties to Set from the Properties Dialog
    Form1frmSearchFormRecord Selectors = No; Navigation Buttons = No; Dividing Lines = No; Auto Center = Yes; Pop up = Yes; Caption = "Customer Search"
    Text0txtCustomerNumText BoxSet corresponding label caption to "Customer Number:"
    Text2txtPhoneText BoxSet corresponding label caption to "Phone:"
    Text4txtLNameText BoxSet corresponding label caption to "Last Name:"
    Text6txtFNameText BoxSet corresponding label caption to "First Name:"
    Text8txtCompanyText BoxSet corresponding label caption to "Company:"
    Text10txtAddressText BoxSet corresponding label caption to ...

Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.