1.3. Automating Microsoft Access Without VBA Code

This book is about automating Access with VBA code; however, not everything you need to do with your database should be accomplished via code. Part of being a good programmer is knowing when to write code and when to let someone else do it for you. The someone else can often be Microsoft Access itself. Access is a powerful application that includes a variety of wizards and built-in commands that can help automate your application without writing even one line of code. This section will go into some detail about how you can automate your application without writing any code at all.

1.3.1. The Database Wizard

If you need to create a database and don't know where to start, you can use the Database Wizard to create several different types of business and personal databases. Some of the different types of databases you can create include:

  • Asset tracking

  • Contact management

    Figure 1.1. Figure 1-1
  • Event management

  • Inventory control

  • Order entry

  • Time and billing

To create a new database using the Database Wizard, open Access and select New from the File menu to display the TaskPane. Choose On my computer from the Templates section and click the Databases tab in the dialog box that appears (Figure 1-1).

Choose the type of database you want to create and click OK. Enter the filename for your database and click Create. Access will display the various screens of the Database Wizard. The particular screens you see and questions the wizard asks will depend on the type of database you selected. We'll detail the steps for creating a database for Inventory Tracking.

The first screen you'll see details the steps Access takes to create your new database. Click Next (see Figure 1-2).

Figure 1.2. Figure 1-2

Each database type requires specific tables and fields. You can choose to add fields beyond the required fields by choosing the table from the left-hand column and by examining the fields in the right-hand column. All checked fields will be included in the selected table. If you attempt to remove a required field, Access will inform you of the field's requirement and leave the box checked. When you're done manipulating the fields in your tables, click Next (see Figure 1-3).

Figure 1.3. Figure 1-3

Choose the style you want for the various forms in your database. Click Next to configure a style for the reports in your database. Click Next again and give your database a title. This title can be different from the filename you assigned to your database. Click Next and then Finish and Access will build your database.

When the wizard completes, Access displays your database. You can then further customize your database.

If you need to create a database and just don't know where to start, using the Database Wizard can help you get started. Even if you don't use all of the tables and reports the wizard creates, using the Database Wizard can give you some ideas of what tables you need in your database.

Once you've completed the Database Wizard you'll see there are many automatic features you can utilize within your database. Switchboards, such as the one in Figure 1-4, provide a launch point for data entry, reports, and graphs you can use within your database. The Switchboard for the Inventory Tracking database allows you to enter data, view that data, preview reports, customize the switchboard, or exit the database. You can configure switchboards to launch a specific report, open a form for data entry, run a query or macro, or display a security warning about unauthorized access to the database. If the switchboard designed by the Database Wizard doesn't meet your needs, you can create your own.

Figure 1.4. Figure 1-4

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.113.9