Results 1 to 9 of 9
  1. #1
    red_101au is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2023
    Posts
    5

    Calculated Fields

    Hi all


    New to the forum long time user.

    I am having trouble getting my head around this one.

    I have a table with calculated fields and that works fine.

    what I am trying to do is get the values from the totals (sum value) at the bottom of each column to display in a textbox / list box or whatever on the form.
    I am not even sure if this is possible so I am asking for any ideas or suggestions to manage this

    I have attached images to try and show

    Thanks


    Click image for larger version. 

Name:	Untitled1.jpg 
Views:	28 
Size:	103.8 KB 
ID:	50351Click image for larger version. 

Name:	Untitled2.jpg 
Views:	27 
Size:	125.0 KB 
ID:	50352

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Use DSum()
    Use a union query that sums those fields with your data.
    Use a recordset for a query that sums those values.

    Option 1 and 3, use separate controls in the footer of the form.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    red_101au is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2023
    Posts
    5
    Thank you Welshgasman
    This did the trick
    The system is up and running very well
    I still am not sure how to get the grand total
    ie: the sum of the 4 distances
    but im sure I will figure this out
    however any further advice would be welcome

    thanks again

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Well what method have you used for the totals. Summing them all together should not be difficult?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    red_101au is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2023
    Posts
    5
    Hi Welsh

    To get the text boxes to display i used the "DSum" with the (relevant field) in each box's control source

    =DSum("North","Distances_qry","Date<# 10/5/2023#").....

    each being individual total

    I still need to add these together to get Total kms

    Thanks to you I got this far

    Click image for larger version. 

Name:	Untitled3.jpg 
Views:	22 
Size:	100.1 KB 
ID:	50354
    Attached Thumbnails Attached Thumbnails Untitled3.jpg  
    Last edited by red_101au; 06-11-2023 at 01:12 PM. Reason: private details showing on pic

  6. #6
    red_101au is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2023
    Posts
    5
    Hi Welsh

    To get the text boxes to display i used the "DSum" with the (relevant field) in each box's control source

    =DSum("North","Distances_qry","Date<# 10/5/2023#").....

    each being individual total

    I still need to add these together to get Total kms

    Thanks to you I got this far

    Click image for larger version. 

Name:	Untitled3.jpg 
Views:	41 
Size:	117.5 KB 
ID:	50353

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    So total is control + control + control + ..... etc?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    red_101au is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2023
    Posts
    5
    Hi again Welsh
    Appreciate the time mate

    I have tried this with several variations but each returns and error.

    I believe there are too many parameters for the equation.


    Click image for larger version. 

Name:	Untitled4.jpg 
Views:	13 
Size:	53.3 KB 
ID:	50356Click image for larger version. 

Name:	Untitled5.jpg 
Views:	13 
Size:	91.1 KB 
ID:	50357

  9. #9
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    You don't need DSum(), just

    =[North]+[South]+[Hills]+[Locals]

    as the control source, as Welshgasman instructed in post #7
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 09-28-2019, 01:32 PM
  2. Replies: 1
    Last Post: 04-12-2017, 07:39 AM
  3. Calculated fields
    By SunTop in forum Queries
    Replies: 2
    Last Post: 11-30-2016, 03:12 AM
  4. Replies: 12
    Last Post: 10-01-2013, 12:59 PM
  5. calculated fields
    By nashr1928 in forum Forms
    Replies: 1
    Last Post: 07-21-2010, 04:49 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