Access basics: what makes a database

Access stores data in tables and gets it back out with queries. Forms and reports are the user interface on top. Here you meet the four objects and try the first two right away.

In short: an Access database is one file (extension .accdb) with tables, queries, forms and reports. The data lives only in the tables. Queries, forms and reports show or change that data; they keep no copy of their own.

Before you start: nothing. You should know what a table with columns and rows is.

Try it now

The exercises use a small database of an office supplies dealer: customers, products, categories, orders and order details. Above you see the Products table. Click the arrow next to a column name to sort, then click Check.

Task Open the Products table in Datasheet view and sort it by unit price, most expensive product first.

Products 18 rows, 6 columns
ProductIDProductNameCategoryIDUnitPriceUnitsInStockDiscontinued
1Blue ballpoint pen11.20121☐
2Highlighter 4-pack13.9076☐
3Hole punch18.50237☐
4Stapler112.9061☐
5Lever arch file12.8076☑
6USB drive 64 GB29.90193☐
7Wireless mouse219.90157☐
8Keyboard234.90216☐
927-inch monitor2229.00129☐
10Headset249.0047☐
11Office chair3189.00135☐
12Desk3349.0046☐
13Mobile pedestal3129.00105☐
14Copy paper A444.5035☐
15Notepad41.90122☐
16Envelopes 100-pack46.9093☐
17Labels47.5075☐
18Laminating pouches411.90211☐

The four objects

ObjectUsed forExample
Tablestores the data, one row per record, one column per fieldCustomers, Products, Orders
Querypicks fields and records, calculates, joins tables, changes dataall customers in Boston, sales per month
Formdata entry screen for people, one record laid out clearlycustomer card with orders below
Reportoutput for printing or PDF, with groups and totalsinvoice, sales list per customer

Macros and modules (VBA) add automation. All objects are listed on the left in the Navigation Pane. Double-click an object to open it.

Record, field and value

A row of a table is a record, a column is a field. In the Customers table each customer is a record; LastName and City are fields. Every field has a data type: text, number, date, currency, yes/no. Unlike Excel, a column always holds the same kind of value, and Access checks this on every entry.

Two views for every object

  • Datasheet view: the data in rows and columns, as in the exercise above. This is where you enter, sort and filter data.
  • Design view: the structure. For a table, the fields with data type and properties; for a query, the design grid.

You switch views with Home, View or the small icons at the bottom right of the status bar.

One more exercise: your first query

A query shows only the fields you put in the grid. Here there are two.

Task Create a query on the Products table that shows only two columns: ProductName and UnitsInStock.

Products 18 rows, 6 columns
ProductIDProductNameCategoryIDUnitPriceUnitsInStockDiscontinued
1Blue ballpoint pen11.20121☐
2Highlighter 4-pack13.9076☐
3Hole punch18.50237☐
4Stapler112.9061☐
5Lever arch file12.8076☑
6USB drive 64 GB29.90193☐
7Wireless mouse219.90157☐
8Keyboard234.90216☐
927-inch monitor2229.00129☐
10Headset249.0047☐
11Office chair3189.00135☐
12Desk3349.0046☐
13Mobile pedestal3129.00105☐
14Copy paper A444.5035☐
15Notepad41.90122☐
16Envelopes 100-pack46.9093☐
17Labels47.5075☐
18Laminating pouches411.90211☐

In real Access: create a database

  1. New database: start Access, choose Blank database, enter a file name and folder, click Create. Access creates an .accdb file and opens an empty Table1.
  2. Saving: unlike Word or Excel, Access saves each record as soon as you leave its row. You only need Save (Ctrl+S) for the structure of an object, such as the design of a table or query.
  3. Open an object: double-click it in the Navigation Pane; right-click and Design View opens its structure.

Common mistakes

Looking for the data in the query

A query holds no data, only the instruction which data to show. When the table changes, the query shows the new state the next time you open it.

Using Access like Excel

Putting everything in one big table wastes what Access is good at. Customers, products and orders belong in separate tables linked by keys. Level 3 of the course shows how.

FAQ

What is Microsoft Access used for?

Access is a relational database management system (DBMS) for Windows: the data sits in several tables that are linked through relationships, so each fact is stored only once. It is used for customer and contact lists, inventory, orders and invoices, member and employee databases, in other words small business applications for one person or a team on a shared drive. For many simultaneous users or a website, a database server such as SQL Server is the better back end.

Where do I get Access?

Access is part of Microsoft 365 Personal and Family, Microsoft 365 Apps for business and Office Professional. It runs on Windows only. You do not need Access for the exercises here.

How much data fits in an Access database?

According to Microsoft, an .accdb file can be at most 2 GB including all objects. That is plenty for customer lists, stock or a club database.

How is it different from Excel?

Excel calculates in cells; Access manages records in tables with fixed data types and relationships. Once the same data (say a customer address) repeats in many rows, or several people enter data at the same time, Access is the better tool.

Learn next: create a table

Add fields, pick the right data type and stop bad entries with field size, Required and a validation rule.

Create a table

Write to us

Choose language

Select your preferred language