Results 1 to 5 of 5
  1. #1
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15

    Enter data direct into calculating field in form

    Hello, I am new to this forum, and using Access as well. I am using Access 2019 (seems to be 2016). I have customized the time billing template for a clock-in and clock-out way of tracking my time on a project. My buttons record the time and the date, and then use the "datediff" function to calculate my actual time. occasionally I will need to enter time directly into this "billable hours" field which is set up for the "timediff" function, but it will not accept any data directly into that field. I assume there is a macro or something to allow me to override (my terminology) the calculation process and just add the hours directly? Thank you for any feedback provided, sorry this may be an extremely simple problem, but I am new to this and still trying to understand all of the ways to accomplish things in Access!

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I assume there is a macro or something to allow me to override (my terminology) the calculation process and just add the hours directly?
    you assume wrong. A calculated field cannot be edited. Also it is not good practice to include calculated fields in a table, calculate in a query as and when required.

    Suggest have a separate field for manual entry of billable hours - and where null (i.e. nothing entered) use the datediff function (in a query). something like

    actualtime:nz(timeentered,datediff(....))

  3. #3
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by Ajax View Post
    you assume wrong. A calculated field cannot be edited. Also it is not good practice to include calculated fields in a table, calculate in a query as and when required.

    Suggest have a separate field for manual entry of billable hours - and where null (i.e. nothing entered) use the datediff function (in a query). something like

    actualtime:nz(timeentered,datediff(....))
    Sorry, I should have elaborated, my buttons are located on a form, which enter information into a query to log the start and stop times etc. which has the datediff function (in the query).............I am also new to this forum type arrangement so bear with me....Thanks.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    principle would be the same as I suggested.

    Rather than describing how you are doing something you will get better responses if you explain what you want to do and provide some relevant example data and the required outcome from that example data together with the code you are using (VBA and SQL). You know your stuff, we don't and descriptions generally don't go far enough to provide more than a best guess as to what the solution might be

  5. #5
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by Ajax View Post
    principle would be the same as I suggested.

    Rather than describing how you are doing something you will get better responses if you explain what you want to do and provide some relevant example data and the required outcome from that example data together with the code you are using (VBA and SQL). You know your stuff, we don't and descriptions generally don't go far enough to provide more than a best guess as to what the solution might be
    I appreciate thefeedback, as I have mentioned I am new to this. I think you answered my question perfectly with your initial response, in that "a calculated field cannot be edited", and so I will proceed as you have mentioned with a separate field for manual entry. I am going to assume I may be asking more questions as I develop my database and so I will try to format those as you have described! Thank you.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-01-2017, 10:28 AM
  2. Replies: 3
    Last Post: 05-15-2017, 06:33 PM
  3. Replies: 1
    Last Post: 09-15-2014, 01:25 PM
  4. Replies: 1
    Last Post: 03-31-2014, 11:10 AM
  5. Replies: 3
    Last Post: 10-04-2010, 07:29 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