Link Vehicle and Maintenance Tables in Microsoft Access Without Duplicating Data
Question details
Connect vehicle plates and numbers to maintenance records so users can select a vehicle and view its related information without duplicating descriptive data.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A database has separate vehicle and maintenance tables, and users need a form for selecting a vehicle and viewing its maintenance history.
- Observed behavior
- The desired design stores each vehicle's plate and number once and links maintenance records through a vehicle ID.
Identify the primary key in the vehicle table and the corresponding vehicle ID field in the maintenance table. If the vehicle ID is an AutoNumber, use a Number field with the Long Integer field size for the maintenance table's foreign key.
Link the tables and create a vehicle form with a maintenance subform
Use a one-to-many relationship and a linked subform to show each vehicle's maintenance records without storing its plate in every record.
In the vehicle table's Design View, set VehicleID as the primary key and keep the plate and vehicle number in that table. In the maintenance table, add a compatible VehicleID field to identify the vehicle for each maintenance record.
Open Database Tools > Relationships, add both tables, and drag VehicleID from the vehicle table to VehicleID in the maintenance table. Select Enforce Referential Integrity and click Create.
Select the vehicle table and use Create > Form to make a form that displays the vehicle's plate and number. Save the form.
Open the vehicle form in Design View and add a Subform/Subreport control based on the maintenance table. In the subform control's Property Sheet, set Link Master Fields to the vehicle table's VehicleID and Link Child Fields to the maintenance table's VehicleID.
In Design View, add a combo box to the vehicle form with the control wizard enabled. Choose the option to find a record on the form based on the selected value, and include the plate or vehicle number so users can identify the vehicle. Select a vehicle in Form View to display its linked maintenance records.

Review exported vehicle data with WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for an easy move between apps. Use WPS Spreadsheets to review vehicle or maintenance data exported from Access; it does not replace Access relationships or linked forms.

Frequently Asked Questions
Why should I store VehicleID instead of the plate in the maintenance table?
VehicleID links each maintenance record to the vehicle table. Keeping the plate in one place avoids inconsistent values when a plate changes.
How do I show only the selected vehicle's maintenance records?
Add a maintenance subform to a vehicle form, then set its Link Master Fields and Link Child Fields properties to the corresponding vehicle ID fields.
Can I select a vehicle by its plate without storing the plate in the maintenance table?
Yes. Add a combo box to the vehicle form that displays the plate and uses the form's vehicle record to show the linked maintenance records.
What field type should the maintenance table use for an AutoNumber vehicle ID?
In the maintenance table's Design View, set the foreign key to Number and its Field Size to Long Integer so it matches the vehicle table's AutoNumber key.
Can WPS Office run my Access forms and relationships?
No. Continue using Microsoft Access for its database relationships and forms. You can export data to an Excel file and open it in WPS Spreadsheets for review.




