Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 10th, 2006, 10:33 AM
Registered User
 
Join Date: Mar 2006
Location: , , United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Moving total from Subform to Main Form

Hi,

This is probably really easy but I cant work out how to sum up the total from a datasheet subform and display this figure in a text box on the main form.

I can sum on the subform using a default value of =sum(Price) but cant get this to work on the main form.

Very rusty on access skills, any advice appeciated.





  #2 (permalink)  
Old March 10th, 2006, 10:57 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Well, you could put a textbox on the main form and set its control source equal to

=Forms.NameOfSubForm.Form.SumTextBox

Where you replace NameOfSubForm with the real name of your subform and you replace SumTextBox with the real name of the textbox that sums the price on the subform. Then you can just make that texbox invisible on the subform.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division


Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronizing main form w/subform (i.e. backward) paladin Access VBA 7 April 19th, 2007 06:40 AM
Main/Subform linkage Ben009 Access 4 April 5th, 2006 01:07 PM
updating main form from subform dartcoach Access 6 April 28th, 2005 08:27 AM
how to parse filter from a form to a main form flyfish Access 1 February 1st, 2005 05:36 AM
Filter subform from main form DBoulos Access VBA 2 October 30th, 2003 12:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.