Create a form in Access

Forms are the user interface of a database: colleagues enter customers, see orders and stop calculating by hand. What a form shows is set by two properties: the Record Source and the Control Source of each control.

In short: the Record Source (table or query) decides which records the form shows. Every text box has a Control Source: a field name makes it bound and editable, an expression starting with = makes it calculated. Both are set in the Property Sheet (F4) on the Data tab.

Before you start: queries and expressions from levels 2 to 4, most recently the level 4 project.

Try it now

The exercise shows the Property Sheet with the form’s controls. Run opens the form preview; use the arrows to move through the records.

Task Build a form for products: the Record Source is the Products table. The text box “Product” shows ProductName, “Price” the UnitPrice and “Stock value” calculates UnitPrice times 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☐

Bound or calculated

Control SourceKindshows
UnitPriceboundthe field value in the field’s format, editable
=[UnitPrice]*[UnitsInStock]calculatedthe result without a format (145.2), read-only
=[FirstName] & " " & [LastName]calculatedjoined text
emptyunboundnothing until someone types

For a format such as Currency, set the Format property on the Format tab.

What the error displays mean

DisplayCause
#Name?a field name is misspelled or missing from the Record Source
#Div/0!division by zero
#Type!text where a number or date is expected
#Func!an invalid argument, such as the square root of a negative number

Task Build a customer card on the Customers table: “Name” shows first and last name with a space between, “Customer since” the field CustomerSince, “Status” the text Regular or New depending on the Regular field.

Customers 25 rows, 10 columns
CustomerIDCompanyFirstNameLastNameCityPostalCodeCountryCustomerSinceRegularDiscount
1NoahEvansLeedsLS1 1URUK28 Feb 2023☑0.1
2Shaw & PartnersNoahDaviesGlasgowG1 1XQUK5 Feb 2024☐0.03
3Northlight IncSophiaHallDenver80202USA30 Jun 2024☑0
4OliviaEvansBristolBS1 4DJUK29 Jun 2022☑0
5OliviaSmithLondonEC1A 1BBUK23 Sep 2025☑0
6Northlight IncMiaEvansManchesterM1 1AEUK1 Feb 2025☐0.1
7Bauer LtdAvaWilsonUK14 Oct 2024☐0.05
8LucasTaylorGlasgowG1 1XQUK2 Jul 2023☐0
9JackClarkSeattle98101USA7 Nov 2022☐0.1
10Northlight IncHenryTaylorDenver80202USA3 Nov 2022☑0.1
11Northlight IncOliverJohnsonBristolBS1 4DJUK6 Mar 2024☐0
12HenryTaylorChicago60601USA24 Dec 2023☐0
13Northlight IncNoahTaylorLondonEC1A 1BBUK12 Oct 2022☐0
14Summit ConsultingMiaSmithAustin78701USA6 Feb 2022☑0
15MiaClarkAustin78701USA9 Mar 2022☑0.05
16ChloeHallSeattle98101USA4 May 2022☐0.03
17Market Street ClinicSophiaJohnsonBoston02108USA4 Jun 2023☑0
18Roth LegalMiaWrightManchesterM1 1AEUK23 Sep 2022☑0.05
19Northlight IncGraceWrightUK16 Dec 2023☐0.03
20Northlight IncOliviaBrownBoston02108USA19 Jun 2023☐0.03
21LiamBrownBoston02108USA23 Jun 2025☐0.03
22Bauer LtdJamesJohnsonManchesterM1 1AEUK5 Jun 2025☐0.05
23NoahWilsonAustin78701USA23 May 2022☐0
24Market Street ClinicJamesSmithBristolBS1 4DJUK16 Jan 2022☐0.1
25Northlight IncSophiaHallDenver80202USA4 Aug 2025☑0

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

In real Access

  1. Select the table in the Navigation Pane, then Create, Form: Access builds a form with every field at once. For an empty form use Form Design.
  2. F4 opens the Property Sheet. Choose “Form” at the top, Data tab, Record Source.
  3. Add a text box (Form Design tab, Controls), select it and set its Control Source in the Property Sheet. The Expression Builder (… next to the box) helps.
  4. Check it with View, Form View; move through the records in the navigation bar at the bottom.

Common mistakes

A field called “Name”

In a form, [Name] means the name of the form itself. A text box with =[Name] therefore shows “Form1”. Do not call fields or controls “Name”.

A control named like a field but calculated

If a text box is called “UnitPrice” and calculates =[UnitPrice]*1.2, you get a circular reference. Give controls a prefix instead: txtGross.

Forgetting the equals sign

Without =, Access takes [UnitPrice]*[UnitsInStock] for a field name and shows #Name?.

FAQ

Form or datasheet?

A datasheet shows many records as a table; a form shows one record clearly with labels and calculations. For data entry by others, a form is safer.

Can the Record Source be a query?

Yes, a saved query or a SELECT statement. The form then shows only the query’s records, such as open orders only.

Learn next: combo box

Show names instead of IDs and let people pick from a list.

Combo box

Write to us

Choose language

Select your preferred language