O'Reilly logo

Beginning Access™ 2007 VBA by Denise Gosnell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required