Others

Pass a Value Between Microsoft Access Forms Using VBA

Huma Ashraf ChHuma Ashraf Ch Nov 22, 2026 868 views

Question details

Copy a converted value from a control on one Access form to a control on a previously opened form.

Pass a Value Between Microsoft Access Forms Using VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
A source form contains a converted value that needs to be transferred to the Add Record form.
Observed behavior
The value should appear in the destination control on the open Add Record form.
Before you start

Open both forms and check the names of the destination form and its control in the property sheet. Confirm that the converted value is available in the source form's New Value control before the VBA code runs.

Solution 1Recommended

Assign the value through the Access Forms collection

Use this method when the destination form is open and the code runs from the source form.

1
Check the control names

In Access, open each form in Design View and use the Property Sheet to check the Name property of the source and destination controls. For this example, the source is New Value and the destination is Values on the Add Record form.

2
Open the VBA event procedure

On the source form, select the button or control that should trigger the transfer. In the Property Sheet, choose its Event tab, select the appropriate event such as On Click, and open its VBA event procedure.

3
Assign the value

Inside the event procedure, add: Forms![Add Record]![Values] = Me![New Value]. The Forms collection identifies the open destination form, while Me identifies the source form containing the code.

4
Test the transfer

Open the Add Record form, then open the source form and trigger the event after the converted value is available. Check that the Values control on Add Record displays the transferred value.

Assign the value through the Access Forms collection
Use the actual control name: If the destination control is named txtValue instead of Values, use Forms![Add Record]![txtValue] = Me![New Value]. The name must match the control's Name property, not necessarily its field name or label.
Free Microsoft Office alternative

Use WPS Office for Documents and Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface for working with compatible Office files. It makes moving document and spreadsheet work straightforward, but it does not fix Microsoft Access form VBA or replace Access databases.

Work with Microsoft Office formats including DOCX, XLSX, and PPTXUse a familiar interface for documents and spreadsheetsOrganize data in spreadsheets alongside your Access workGet a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does the destination Access form need to be open?

Yes. The Forms collection references open forms, so open Add Record before the assignment runs. You can open it manually or use DoCmd.OpenForm "Add Record" before assigning the value.

Why does Access say it cannot find the control?

Open the destination form in Design View and check the control's Name property in the Property Sheet. Use that exact name in the VBA reference; a label or underlying field can have a different name.

What does Me refer to in the VBA statement?

Me refers to the form whose module contains the code. In this example, Me![New Value] reads the control on the source form.

Does assigning the value save it to the database?

The assignment updates the destination control. If it is bound to a field, the change is stored when Access saves the record; an unbound control does not save the value to a table by itself.