Math Calculations in Unbound Form


Board Regular
Aug 8, 2007
I have a form that has a simple calculation that needs to be done and I was almost certain I was able to do this in an unbound form but I'm not having any luck

I have two values in unbound text boxes that are time. For example:

Text01 "txtTalkTime" = 00:43:13 (The user should enter the amount of time spent talking)
Text02 "txtReadyTime" = 01:35:24 (The user should enter the amount of time spent ready)
Text03 "txtCoverageProvided" = Text01 + Text02 (This should display 02:18:37, adding both the above fields)
Text04 "txtCoverageRequirement" = 04:00:00 (The user should enter the amount of time required)
Text05 "txtCoverageRemaining" = Text04 - Text03 (This should display 01:41:23, subtracting the provide amount of coverage from the requirement)

I didn't think that this was overly complicated, I have this completed in Excel easily but for some odd reason, I'm having quite the challenge of getting this in Access. I think it may be an issue of formatting and the expression used.

Anyone have any advice?

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.


Board Regular
Aug 8, 2007
I was able to get working. I found the problem. txtCoverageRequirement is supposed to have a default value of 04:00:00 but I entered this wrong. Access did not like the colons however, I found out that with date/time, it needs to be entered as =#4:00:00 AM#. With that update, everything is working smoothly.

My only gripe is my last text box, txtCoverageRemaining, still has the AM/PM when it's clicked into. All of these fields are formatted as hh:nn:ss and when clicked into, do not display the AM/PM. I'm not sure why this one text box displays it when clicked into.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...