G
Guest
Hi, I am a novice to access and facing a problem while updated a text field.
I have three text boxes on a form; start and end times of an event and
another text box which shows the time difference in minutes. I am trying to
compute the time difference in minutes automatically once the end time has
been updated / changed.
I did the following and it dosen't seem to work:
Set the After update even of txEndTime ( using expression builder as well as
code builder)
[1] expression builder: [txTimeTaken] =
DateDiff("n",[txStartTime],[txEndTime])
~ This dosen't seem to do anything when I change the value in txEndTime
[2] code builder:
Private Sub txtEndTime_AfterUpdate()
Set txTimeTaken.Value = DateDiff("n", txStartTime, txEndtime)
End Sub
~ This sets the value to '0'.
Any inputs would be much appreciated.
TIA
cole
I have three text boxes on a form; start and end times of an event and
another text box which shows the time difference in minutes. I am trying to
compute the time difference in minutes automatically once the end time has
been updated / changed.
I did the following and it dosen't seem to work:
Set the After update even of txEndTime ( using expression builder as well as
code builder)
[1] expression builder: [txTimeTaken] =
DateDiff("n",[txStartTime],[txEndTime])
~ This dosen't seem to do anything when I change the value in txEndTime
[2] code builder:
Private Sub txtEndTime_AfterUpdate()
Set txTimeTaken.Value = DateDiff("n", txStartTime, txEndtime)
End Sub
~ This sets the value to '0'.
Any inputs would be much appreciated.
TIA
cole