Others

Use an Unbound Microsoft Access Form for Temporary Data Entry

Ayan MasoodAyan Masood Nov 22, 2026 869 views

Question details

Collect values in a Microsoft Access form and save them to multiple tables only when the user submits them.

Use an Unbound Microsoft Access Form for Temporary Data Entry
Product
Microsoft Access
Device & OS
not provided
Scenario
A user needs a temporary data-entry form that creates related table records after validation.
Observed behavior
Form controls hold the entered values until the user submits or closes the form.
Before you start

Identify the target tables, required fields, and relationships, including any AutoNumber primary key needed by a related table. Make sure you can edit the form and its VBA code in Access.

Solution 1Recommended

Save unbound form values to related tables with DAO

Use this approach when entries should remain temporary until the user clicks Submit.

Unbound controls hold values while the form is open, so separate VBA variables are generally unnecessary. Closing the form without running the save code discards those values.

1
Create an unbound form

Open the form in Design View. In the Property Sheet, leave the form's Record Source blank, then add input controls and leave each control's Control Source blank.

2
Add a Submit button

Add a button in Design View. On its Property Sheet's Event tab, set On Click to [Event Procedure] and click the build button to open the VBA editor.

3
Validate the entries

In the button's Click procedure, check the required controls using their names, such as Me.txtName. If a value is missing or invalid, display a message and exit the procedure before writing records.

4
Write the records

In the same procedure, open DAO recordsets for the target tables. For each record, call AddNew, assign the appropriate control values to fields, and call Update. If a related record needs a newly generated AutoNumber, use the first recordset's LastModified bookmark after Update to retrieve the key before adding the related record.

5
Commit or roll back the submission

For tables that support transactions, use the DAO Workspace BeginTrans before writing and CommitTrans after all updates succeed. Add error handling that calls Rollback if a transaction is active, reports the error, and closes the recordsets.

Save unbound form values to related tables with DAO
Match the code to your database: Replace example control and field names with your own. Transaction support depends on the data source; check it before relying on rollback to prevent partial submissions.
Free Microsoft Office alternative

Use WPS Office for Documents and Spreadsheets

WPS Office is a free, lightweight alternative for everyday documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to move common files between suites. Microsoft Access is still needed for the unbound form and DAO workflow described above.

Use spreadsheets to organize and review tabular data.Open and edit common Microsoft Office formats, including DOCX, XLSX, and PPTX.Work in a familiar interface that eases the transition from Microsoft Office.Use a free, lightweight suite for everyday office tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Do I need VBA variables for every unbound control?

Usually not. In the Submit button's Click procedure, read values directly from named controls, such as Me.txtName. Use variables when they make validation or calculations clearer.

What happens if someone closes the form without submitting?

Values in unbound controls are discarded when the form closes, provided no other form event or VBA code saves them.

Can I use an INSERT query instead of a DAO recordset?

Yes. In the Submit button's Click procedure, execute parameterized INSERT INTO queries after validating the controls. Supply parameters for the control values and handle errors before reporting success.

How do I link a new child record to an AutoNumber parent?

Add and update the parent record first. In DAO, move to the recordset's LastModified bookmark, read the generated primary key, and assign it to the child record's foreign-key field before updating the child.