Results 1 to 2 of 2
  1. #1
    spleewars is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2012
    Posts
    26

    Ubnormal SUM behavior

    The scenario is based on 2 data fields: "IN" and "OUT": both are time fields and the main function is to serve as a punch clock. In order to work out calculations and get the total time, both were passed into a query and set out the formula:


    datediff ("n",[in],[out])

    So to convert the raw time of the latter formula, i set a new one to divide the amount of 'datediff' into hours and minutes:


    [totalhours]\60 & Format([totalhours] Mod 60, "\:00")

    Everything's fine to here... however, when i loaded the query into a continuous form and set the SUM function into an unbound text box (so i could sum up all the totalhours) ERROR pops up. The control scorce of the textbox is:




    =SUM([totalhours])\60 & Format(SUM([totalhours]) Mod 60, "\:00")

    Obviously the textbox is set in the footer but still resolving the error.


    What is the reason of the error?
    Clara

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    An error message pops up or just shows in the textbox?

    Probably has to do with having Sum in the expression twice. Try doing the Sum calc alone in a textbox. Then refer to that textbox in concatenation calc in another textbox. You can make the Sum textbox not visible.
    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. List Box Behavior
    By Paul H in forum Forms
    Replies: 2
    Last Post: 01-25-2012, 03:48 PM
  2. Replies: 3
    Last Post: 12-26-2011, 10:45 AM
  3. Web Form Behavior on Sharepoint
    By Flanders in forum SharePoint
    Replies: 1
    Last Post: 09-12-2011, 03:00 PM
  4. Form/Subform Tab Behavior
    By bsc in forum Programming
    Replies: 10
    Last Post: 08-31-2011, 04:01 PM
  5. MS Access Enter Key Behavior
    By RAPSR in forum Programming
    Replies: 0
    Last Post: 12-23-2007, 02:31 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