Results 1 to 4 of 4
  1. #1
    muhammadirfanghori is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    6

    Can i get subform total on mainform

    How can i get subform total on Mainform i have try many tricks but not work for me
    i have attached sample database please any one can help ??


    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	102.2 KB 
ID:	20125
    Invoice.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Subform in design view, create a textbox in the form footer or header section that calculates the sum. Textbox on main form can reference the textbox, even though it won't display in the datasheet subform.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    muhammadirfanghori is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    6
    Can you explain in my sample database

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    SubTotal field is defined as Long Integer. If you want decimals need to be Double type. Actually, SubTotal should not be saved into record - should be calculated when needed. Same for Amount in PurchaseInvoice.

    Quantity field is set as text and must be number, long integer.

    For some reason, the Sum() function still shows #Error in the textbox.

    I don't understand why this fails. This technique has worked before. And I just tested again in my db and it works. Sorry, I don't know what is wrong with yours.


    Advise not to use spaces and special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  2. Replies: 4
    Last Post: 03-30-2012, 01:47 AM
  3. Replies: 1
    Last Post: 11-29-2011, 01:37 AM
  4. Link between subform and mainform
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-24-2011, 07:05 AM
  5. MainForm/SubForm question
    By 10 Gauge in forum Forms
    Replies: 5
    Last Post: 03-04-2011, 07:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums