Is it possible to take a number in a main form (stored in a table) and subtract a number in sub form (stored in a separate table) and if so how would you do it? I've tried a couple of ways and have had no success.
Jerry
If you use the expression builder on the Object you're wanting to display the results in, then yes.
Example.
Form Objects.
txtResult (textbox where the calculation will occur)
txtValue1 (textbox where a numeric value is stored)
Subform Objects.
txtValue2 (textbox where a numeric value is stored)
In Design Mode, right click on txtResult, right click Properties, select the Data Tab, click in the Control Source field, click the 3 dots ( ... ) to the right, double click the folder with the + in it that is named after the form you are in.
You'll now see your form and its associated subform.
Select the control you wish to subtract from and double click it.
Now select the subform folder under your form folder on the left.
Select the control who's value you inted to subtract from the control on your main form and double click it.
Click Ok
That should do it.
= [txtValue1] - [SubFormName].Form![txtValue2] is what you should see.