Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338

    Display Total on a form

    Hello



    How can i display a sum based on all category that are currently displayed?



    Thank You

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    The sum of what?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    providername month year Cash Cash Cleared Check Check Cleared Credit Card Credit Card Cleared Source of Payment Grand Total
    John Doe February 2012 0.00 FALSE 500.00 FALSE 0.00 FALSE LocBox 500.00
    John Doe February 2012 0.00 FALSE 400.00 FALSE 0.00 FALSE LocBox 400.00
    John Doe February 2012 20.00 FALSE 0.00 FALSE 45.00 FALSE Billing Dept. 65.00
    John Doe February 2012 0.00 FALSE 1,000.00 FALSE 0.00 FALSE Billing Dept. 1,000.00
    LocBox Billing Dept. EFT
    $ 900.00 $ 1,065.00 $ -
    I Would like show these totals based on what is currently displayed on the form

  4. #4
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    What is in red i would like to add it to the form to show me sum based on what is displayed on the form.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    How is the form displayed. Single Form or Continuous Forms.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Continuous form

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    My suggestion would be to create a text box for each total in the forms footer section. Use DSum() function in each to get the total. The syntax for the DSum() function can be found in the help files. Getting the criteria correct may cause a problem.
    What is the Record Source of the form. I assume this is a query or a SQL statement. Can you post the SQL statement or the SQL statement of the query.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    It's a Query

    SELECT T_MonthlyTotals.[Systems Posted on], T_DocInfo.[Provider Name], T_MonthlyTotals.[Date of Posting From], Format([Date of Posting From],"mmmm") AS [Month], Format([Date of Posting From],"yyyy") AS [Year], T_MonthlyTotals.[Date of Posting To], T_MonthlyTotals2.[Date of RCPT], T_MonthlyTotals2.[RCPT #], T_MonthlyTotals2.Cash, T_MonthlyTotals2.[Cash Cleared], T_MonthlyTotals2.Check, T_MonthlyTotals2.[Check Cleared], T_MonthlyTotals2.[Credit Card], T_MonthlyTotals2.[Credit Card Cleared], T_MonthlyTotals2.[Source of Payment], [Cash]+[Check]+[Credit Card] AS [Grand Total], T_MonthlyTotals2.[All Cleared], T_MonthlyTotals2.Comments, T_MonthlyTotals2.[Reflected last Month]
    FROM (T_MonthlyTotals INNER JOIN T_MonthlyTotals2 ON T_MonthlyTotals.ID = T_MonthlyTotals2.[ID Main Table]) LEFT JOIN T_DocInfo ON T_MonthlyTotals.[Provider Name] = T_DocInfo.ID
    WHERE (((T_DocInfo.[Provider Name])=[Forms]![F_ReconciliationList].[providername]) AND ((Format([Date of Posting From],"mmmm"))=[Forms]![F_ReconciliationList].[month]) AND ((Format([Date of Posting From],"yyyy"))=[Forms]![F_ReconciliationList].[year]) AND ((T_MonthlyTotals2.[All Cleared])=No))
    ORDER BY T_MonthlyTotals2.[Date of RCPT], T_MonthlyTotals2.[RCPT #];

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try this in the form footer:

    =Sum(IIf([Source of Payment] = "LocBox", [Cash]+[Check]+[Credit Card], 0))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    I get this #Error

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Make sure there's not a textbox named "Source of Payment", which there probably is and can confuse Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    I only have a label and combo box with source of payment

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Is that field perhaps a numeric ID field rather than the text you see?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    yes it is a numeric field.

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    So test the number:

    =Sum(IIf([Source of Payment] = 3 , [Cash]+[Check]+[Credit Card], 0))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Total Box on Form
    By Bike in forum Forms
    Replies: 3
    Last Post: 04-05-2011, 01:30 PM
  2. Rolling Total in Form
    By foxtrot in forum Forms
    Replies: 2
    Last Post: 01-26-2011, 05:45 AM
  3. Replies: 1
    Last Post: 02-04-2010, 01:15 PM
  4. Replies: 3
    Last Post: 10-23-2009, 05:03 PM
  5. Total Number of Fields allowed on a Form
    By tpearo in forum Forms
    Replies: 1
    Last Post: 12-15-2005, 06:57 PM

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