Becoming familiar with the tables, forms, queries, and other objects in an Access database can make it easier to perform a wide variety of tasks, such as entering data into a form, adding or removing tables, finding and replacing data, and running queries.
This article provides a basic overview of the structure of an Access database. Access provides several tools that you can use to familiarize yourself with the structure of a particular database. This article also explains how, when, and why you use each tool.
A database is a collection of information that is related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection. If your database isn't stored on a computer, or only parts of it are, you may be tracking information from a variety of sources that you must coordinate and organize.
For example, suppose the phone numbers of your suppliers are stored in various locations: in a card file containing supplier phone numbers, in product information files in a file cabinet, and in a spreadsheet containing order information. If a supplier's phone number changes, you might have to update that information in all three places. In a well-designed Access database, the phone number is stored just once, so you only have to update that information in one place. As a result, when you update a supplier's phone number, it is automatically updated wherever you use it in the database.
You can use Access to manage all of your information in one file. Within an Access database file, you can use:
1. Store data once in one table, but view it from multiple locations. When you update the data, it's automatically updated everywhere it appears.
2. Retrieve data by using a query.
3. View or enter data by using a form.
4. Display or print data by using a report.
All of these items — tables, queries, forms, and reports — are database objects.
Note: Some Access databases contain links to tables that are stored in other databases. For example, you may have one Access database that contains nothing but tables, and another Access database that contains links to those tables, as well as queries, forms, and reports that are based on the linked tables. In most cases, it does not matter whether a table is a linked table or actually stored in the database.
To store your data, you create one table for each type of information that you track. Types of information might include customer information, products, and order details. To bring the data from multiple tables together in a query, form, or report, you define relationships between the tables.
1. Customer information that once existed in a mailing list now resides in the Customers table.
2. Order information that once existed in a spreadsheet now resides in the Orders table.
3. A unique ID, such as a Customer ID, distinguishes one record from another within a table. By adding one table's unique ID field to another table and defining a relationship between the two fields, Access can match related records from both tables so that you can bring them together in a form, report, or query.
A query can help you find and retrieve the data that meets conditions that you specify — including data from multiple tables. You can also use a query to update or delete multiple records at the same time and to perform predefined or custom calculations on your data.
1. The Customers table has information about customers.
2. The Orders table has information about customer orders.
3. This query retrieves the Order ID and Required Date data from the Orders table, and the Company Name and City data from the Customers table. The query returns only orders that were required in April, and only for customers who are based in London.
You can use a form to easily view, enter, and change data one row at a time. You can also use a form to perform other actions, such as sending data to another application. Forms typically contain controls that are linked to underlying fields in tables. When you open a form, Access retrieves the data from one or more of those tables, and then displays the data in the layout that you chose when you created the form. You can create a form by using one of the Form commands on the Ribbon, the Form Wizard, or create a form yourself in Design view.
1. A table displays many records at the same time, but you may have to scroll horizontally to see all of the data in a single record. Also, when you view a table, you can't update data from more than one table at the same time.
2. A form focuses on one record at a time, and it can display fields from more than one table. It can also display pictures and other objects.
3. A form can contain a button that you click to print a report, open other objects, or otherwise automate tasks.
You can use a report to quickly analyze your data or to present it a certain way in print or in other formats. For example, you may send a colleague a report that groups data and calculates totals. Or, you may create a report with address data formatted for printing mailing labels.
1. Use a report to create mailing labels.
2. Use a report to show totals in a chart.
3. Use a report to display calculated totals.
Now that you know about the basic structure of Access databases, read on to learn how to use the built-in tools to explore a particular Access database.
One of the best ways to learn about a particular database is by using the Database Documenter. You use the Database Documenter to build a report containing detailed information about the objects in a database. You first choose which objects will be detailed in the report. When you run the Database Documenter, its report contains all of the data about the database objects that you selected.
Opening a table in Design view gives you a detailed look at the table's structure. For example, you can find the data type setting for each field, find any input masks, or see if the table uses any lookup fields — fields that use queries to extract data from other tables. This information is useful because data types and input masks can affect your ability to find data and run update queries. For example, suppose that you want to use an update query to update particular fields in one table by copying data in similar fields from another table. The query will not run if the data types for each field in the source and destination tables don't match.
The lookup field shown here uses a query to retrieve data from another table. You may also see another type of lookup field, called a value list, that uses a hard-coded list of choices. This figure shows a typical value list.
To see a graphical representation of the tables in a database, the fields in each table, and the relationships between those tables, use the Relationships object tab. The Relationships object tab provides an overall picture of the table and relationship structure of a database — crucial information when you need to create or change the relationships between tables.
Note: You can also use the Relationships object tab to add, change, or delete relationships.
The Relationships object tab appears and shows you the relationships between all of the tables in the open database.