In this blog, I am going to show you how to do calculations using **Subform **values.

So what calculations can you do?

• Calculate the total sum for a particular sub form field e.g. hours worked.

• Count the number of sub forms that have been filled in e.g. how many jobs have been done in a day?

• Find out the maximum number that has been entered into a specific field on the sub forms.

• Find out the minimum number that has been entered into a specific field on the sub forms.

• Find out the average number that has been entered into a specific field on the sub forms.

I’ve made a simple form and sub form to show you this. My sub form just has a **Number field,** and the main form has the fields that make all the calculations.

As you can see, my main form has a **Header**, a **Subform** control, and then all controls to make our calculations. So, what do these do?

1. This is a number field which calculates the total value of the numbers entered on the individual subforms. You add a formula to calculate;

**=DSUM (’15 – Sub form formula Sub’,’Enter a number’)**

So, for example if you completed 3 subforms, with the numbers entered ‘8’, ‘10’ and ‘12’, the total here would should show ‘30’.

2. This is a number field which calculates the total number of sub forms you have completed. You add a formula to calculate;

**=DCOUNT(’15 – Sub form formula Sub’,’Enter a number’)**

So, for example if you completed 3 subforms, the total here would show ‘3’.

3. This is a number field which calculates the maximum value entered in all the subforms. You add a formula to calculate;

**=DMAX(’15 – Sub form formula Sub’,’Enter a number’)**

So, for example if you completed 3 subforms, with the numbers entered ‘8’, ‘10’ and ‘12’, the value here would should show ‘12’.

4. This is a number field which calculates the maximum value entered in all the subforms. You add a formula to calculate;

**=DMIN(’15 – Sub form formula Sub’,’Enter a number’)**

So, for example if you completed 3 subforms, with the numbers entered ‘8’, ‘10’ and ‘12’, the value here would should show ‘8’.

5. This is a number field which calculates the average value entered in all the subforms. You add a formula to calculate;

**=DAVERAGE(’15 – Sub form formula Sub’,’Enter a number’)**

So, for example if you completed 3 subforms, with the numbers entered ‘8’, ‘10’ and ‘12’, the value here would should show ‘10’.

All the number fields have a number type of ‘2+ Decimal Places’, to allow for any values which are not whole numbers.

Try this out on my test account with the login details

**Username – blog**

**Password – blog**

And choose form **’15 – Sub form formula’**