Results 1 to 7 of 7
  1. #1
    Gabriel984 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    4

    Need help with calculation please


    I have 5 fields "start"(short Time) "End"(short time) "worked"=Format([Start]-1-[End],"Short Time") "rate"(currency) and "Total", all Im trying to do is calculate the total of "worked" multiplied by "rate" to give me the "total" Yes I know an Idiots question..but been working on this for hours and Im still unable to get anywhere, could some please point me in the direct, many thanks

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Somebody say you should not keep calculated field in the table. So, actually you need only 3 fields.

    And, even if you really need to keep worked in you table, it should be a number, not a time nor a text.

    Please remember [Start]-1-[End] is to calculate worked days, you need to set the rate by day. but you use short time for begin and end, I guess you want to calulate work hours. Please use ([start] - [end]) * 24 to calculate hours, and you need to round it to hour or quarter according your rule.

  3. #3
    Gabriel984 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    4
    Many, many thanx for your quick response... will give that a try, once again thankyou for your time

  4. #4
    Gabriel984 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    4
    I have followed your instructions and I am now able to get the results I was trying for, and I thank you for your help, however, when using a 24 hour system I get some negative numbers..ie: "start:13.00 end19.00 hours -6 start 20.00 end 08.00 hours 12
    If I may ask for your kind help once more, to ask if there is a way of surpressing the negative numbers please. I have included a demo database of what is happening as I am not so good at explaining myself. Many thanx

  5. #5
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I could not download a ".mdb" file due to company policy. please attach a .zip file.

  6. #6
    Gabriel984 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    4
    many thanx for your time....have now attached zip file

  7. #7
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    My mistake.

    You should use
    [end] - ([start]) * 24
    instead of
    ([start] - [end]) * 24

    you need a full date/time, not short time, if you have end time and start time on different day.

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

Similar Threads

  1. Calculation Help
    By edge5511 in forum Programming
    Replies: 4
    Last Post: 12-18-2015, 11:11 AM
  2. Calculation Help
    By ErnieS in forum Access
    Replies: 13
    Last Post: 07-08-2010, 08:35 AM
  3. Inventory Calculation
    By ser01 in forum Queries
    Replies: 1
    Last Post: 04-24-2010, 12:24 PM
  4. Date Calculation ?
    By techexpressinc in forum Queries
    Replies: 2
    Last Post: 06-24-2009, 09:02 PM
  5. Calculation
    By thestclair in forum Reports
    Replies: 1
    Last Post: 04-29-2006, 11:03 AM

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