pcalabria
asked on
Unable to write to text box in MS Access 2K
Hello Experts, I'm using Access 2K on a windows xp professional sp3 platform.
Wow... this problem is driving me crazy. I wrote code to display how long an event takes and then display the time in a text box called txtETime on a form called
Forms!frmcaptureworldinven tory.
The code seems to calculated the elapsed time correctly, but will not display it in the text box. Nothing is displayed, not even an error message.
I was totally confused, so I created a second text box on the form, and ran the code again, written below. The code below only displays the result in the text box called: etime
I need to display the code in the txtETime textbox as this box is used by other routines, which have no trouble!
Code:
Private Sub Capture_Click()
Dim dteStartTime As Date
On Error GoTo Error_Routine
dteStartTime = Now
Call ClearCapture
Forms!frmcaptureworldinven tory.txtET ime = DateDiff("s", dteStartTime, Now) & " seconds"
Forms!frmcaptureworldinven tory.etime = DateDiff("s", dteStartTime, Now) & " seconds"
Exit Sub
Error_Routine:
MsgBox Err.Description
End Sub
Wow... this problem is driving me crazy. I wrote code to display how long an event takes and then display the time in a text box called txtETime on a form called
Forms!frmcaptureworldinven
The code seems to calculated the elapsed time correctly, but will not display it in the text box. Nothing is displayed, not even an error message.
I was totally confused, so I created a second text box on the form, and ran the code again, written below. The code below only displays the result in the text box called: etime
I need to display the code in the txtETime textbox as this box is used by other routines, which have no trouble!
Code:
Private Sub Capture_Click()
Dim dteStartTime As Date
On Error GoTo Error_Routine
dteStartTime = Now
Call ClearCapture
Forms!frmcaptureworldinven
Forms!frmcaptureworldinven
Exit Sub
Error_Routine:
MsgBox Err.Description
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
If the above is still an issue please post the code for the sub ClearCapture
Thanks,
Bill
If the above is still an issue please post the code for the sub ClearCapture
Thanks,
Bill
ASKER
Recreating the text box did it!
Thanks
Thanks
Open in new window
Open in new window