Calculating time?

  • Thread starter Thread starter BonnieW via AccessMonster.com
  • Start date Start date
B

BonnieW via AccessMonster.com

I have a textbox on a bound form which I would like to have display the
elapsed time of a visit, in hours. This value will not be stored in the
table. Right now, I have as the control source of the textbox:
=DateDiff("h",[txtTime1],[txtTime2])
Which, oddly enough, only displays (correctly, by the way, hooray for that
much) when I click in the box. When I click off, it disappears.

Why? How can I get it to stop? Thanks in advance!
 
BonnieW said:
I have a textbox on a bound form which I would like to have display the
elapsed time of a visit, in hours. This value will not be stored in the
table. Right now, I have as the control source of the textbox:
=DateDiff("h",[txtTime1],[txtTime2])
Which, oddly enough, only displays (correctly, by the way, hooray for that
much) when I click in the box. When I click off, it disappears.


It sounds like the text box has an unusual setting in its
Format property. Or maybe there is another text box on top
of it??
 
It must've been something odd, that's for sure. There was nothing in the
Format property, nothing in the Events, nothing unusual in any of the
properties. There was no other textbox on top of it, either. So I created
another textbox with the calculation as the control source, deleted the old
one, and now it works fine.

Marshall said:
I have a textbox on a bound form which I would like to have display the
elapsed time of a visit, in hours. This value will not be stored in the
table. Right now, I have as the control source of the textbox:
=DateDiff("h",[txtTime1],[txtTime2])
Which, oddly enough, only displays (correctly, by the way, hooray for that
much) when I click in the box. When I click off, it disappears.

It sounds like the text box has an unusual setting in its
Format property. Or maybe there is another text box on top
of it??
 
Back
Top