If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Calculations between forms
I have a form with a subform attached. I am trying to get the quantities
from the subform to total so i can use them in a calculation in the primary form. -- JEV |
#2
|
|||
|
|||
Calculations between forms
Place a text box in the Form Footer section of the subform.
Set its Control Source to sum the field you want, e.g.: =Sum([Qty]) If the subform is in Form or Continuous view, you can see the total. In Datasheet view you can't (though there is a way in Access 2007), so you will need a text box on the main form to display the total. Its Control Source will be like this: =[Sub1].[Form]![Text0] where you use your subform control name instead of Sub1, and the name of the text box created above instead of Text0. The .Form bit stays as it, as explained he http://allenbrowne.com/casu-04.html For an example of such a form, look at the Orders form in the Northwind sample database. There is an extra wrinkle if new records cannot be added to the subform. Its Detail section goes completely blank when there are no records to show, and the expressions error out. Post back if you hit this. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jamie" wrote in message ... I have a form with a subform attached. I am trying to get the quantities from the subform to total so i can use them in a calculation in the primary form. -- JEV |
Thread Tools | |
Display Modes | |
|
|