Access Using Expressions (Calculated Fields) In Form Controls

This article explains how you can display the result of an Expression in a form control.

Consider the table below:
Table
We want to create the following form:
Form

The form has 4 textboxes:

  • TextBox #1: Displays the value of “Field1”
  • Textbox #2: Displays the value of “Field2”
  • Textbox #3: Displays the value of “Field1 * 5”
  • Textbox #4: Displays the value of “Field1 + Field2”

Contents

Step 1:

Open the form in design mode:
Design Mode


Step 2:

Select the first text box and select “Field1” as the Control Source:
Textbox1
Repeat this for the second textbox, and choose “Field2” as the Control Source.


Step 3:

Select the 3rd textbox and click on the 3 dot button in the Control Source:
Third Textbox

In the expression builder type the following expression:

=[Field1]*5

Repeat this for the 4th textbox. Write the following expression in the expression builder:

=[Field1]+[Field2]

You can download the sample file used in this article from the link below:

See also:

If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website  www.software-solutions-online.com

Leave a Reply

Your email address will not be published. Required fields are marked *