A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculations between forms



 
 
Thread Tools Display Modes
  #1  
Old June 18th, 2008, 01:37 PM posted to microsoft.public.access.tablesdbdesign
Jamie
external usenet poster
 
Posts: 317
Default 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  
Old June 18th, 2008, 02:02 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.