Results 1 to 3 of 3
  1. #1
    aqueousdan is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Sep 2016
    Posts
    20

    Trying to do a basic "total time" calculation... help!

    I am trying to learn Access and am getting stuck on something which is probably quite basic.



    I have looked here to find a guide on how to calculate a total time based on a start and an end time. I follow the guide and end up with something that doesnt work. Can anyone take a look at my simple database and explain what im doing wrong?

    I have made a query which returns me a number of minutes. I would then like to use this in a text box but just get #Name?

    (After that I will need to do this bit =[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00") but ill worry about that when I get the first part working!)


    Thanks for your help,


    Dan
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Try basing your form on the query rather than the table. You can't refer to a second source like that. You could use a DLookup(), but simplest is to base the form on the query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    As Paul said, you need to base the form on the query. You cannot refer to a column in a query like you did. (why you had "#Name")

    And you have used reserved words as your field names: "Start" and "End". I changed them to "TimeStart" and "TimeEnd".
    See http://allenbrowne.com/AppIssueBadWord.html
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Replies: 11
    Last Post: 05-09-2014, 12:00 PM
  3. Replies: 5
    Last Post: 06-25-2012, 02:06 PM
  4. Replies: 2
    Last Post: 04-24-2012, 01:15 PM
  5. Replies: 7
    Last Post: 01-23-2011, 12:32 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