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
| ProductID | ProductName | CategoryID | UnitPrice | UnitsInStock | Discontinued |
|---|---|---|---|---|---|
| 1 | Blue ballpoint pen | 1 | 1.20 | 121 | ☐ |
| 2 | Highlighter 4-pack | 1 | 3.90 | 76 | ☐ |
| 3 | Hole punch | 1 | 8.50 | 237 | ☐ |
| 4 | Stapler | 1 | 12.90 | 61 | ☐ |
| 5 | Lever arch file | 1 | 2.80 | 76 | ☑ |
| 6 | USB drive 64 GB | 2 | 9.90 | 193 | ☐ |
| 7 | Wireless mouse | 2 | 19.90 | 157 | ☐ |
| 8 | Keyboard | 2 | 34.90 | 216 | ☐ |
| 9 | 27-inch monitor | 2 | 229.00 | 129 | ☐ |
| 10 | Headset | 2 | 49.00 | 47 | ☐ |
| 11 | Office chair | 3 | 189.00 | 135 | ☐ |
| 12 | Desk | 3 | 349.00 | 46 | ☐ |
| 13 | Mobile pedestal | 3 | 129.00 | 105 | ☐ |
| 14 | Copy paper A4 | 4 | 4.50 | 35 | ☐ |
| 15 | Notepad | 4 | 1.90 | 122 | ☐ |
| 16 | Envelopes 100-pack | 4 | 6.90 | 93 | ☐ |
| 17 | Labels | 4 | 7.50 | 75 | ☐ |
| 18 | Laminating pouches | 4 | 11.90 | 211 | ☐ |
The four objects
| Object | Used for | Example |
|---|---|---|
| Table | stores the data, one row per record, one column per field | Customers, Products, Orders |
| Query | picks fields and records, calculates, joins tables, changes data | all customers in Boston, sales per month |
| Form | data entry screen for people, one record laid out clearly | customer card with orders below |
| Report | output for printing or PDF, with groups and totals | invoice, 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
| ProductID | ProductName | CategoryID | UnitPrice | UnitsInStock | Discontinued |
|---|---|---|---|---|---|
| 1 | Blue ballpoint pen | 1 | 1.20 | 121 | ☐ |
| 2 | Highlighter 4-pack | 1 | 3.90 | 76 | ☐ |
| 3 | Hole punch | 1 | 8.50 | 237 | ☐ |
| 4 | Stapler | 1 | 12.90 | 61 | ☐ |
| 5 | Lever arch file | 1 | 2.80 | 76 | ☑ |
| 6 | USB drive 64 GB | 2 | 9.90 | 193 | ☐ |
| 7 | Wireless mouse | 2 | 19.90 | 157 | ☐ |
| 8 | Keyboard | 2 | 34.90 | 216 | ☐ |
| 9 | 27-inch monitor | 2 | 229.00 | 129 | ☐ |
| 10 | Headset | 2 | 49.00 | 47 | ☐ |
| 11 | Office chair | 3 | 189.00 | 135 | ☐ |
| 12 | Desk | 3 | 349.00 | 46 | ☐ |
| 13 | Mobile pedestal | 3 | 129.00 | 105 | ☐ |
| 14 | Copy paper A4 | 4 | 4.50 | 35 | ☐ |
| 15 | Notepad | 4 | 1.90 | 122 | ☐ |
| 16 | Envelopes 100-pack | 4 | 6.90 | 93 | ☐ |
| 17 | Labels | 4 | 7.50 | 75 | ☐ |
| 18 | Laminating pouches | 4 | 11.90 | 211 | ☐ |
In real Access: create a database
- 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.
- 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.
- 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.