I have a form with a text box I use to capture a datetime value on a button click.
In the code behind I check to make sure a user has entered a date time value using this code:
If the user forgets to enter a date time the msgBox displays as expected. However when the user then enters the dat time in the text box and clicks the button again the error message still is shown.
Why is the button click not seeing the data that has now been entered in the form?
In the code behind I check to make sure a user has entered a date time value using this code:
Code:
ElseIf Trim(ReceivedDateTime & "") = "" Then
MsgBox "Call Received Date/Time Is Required"
If the user forgets to enter a date time the msgBox displays as expected. However when the user then enters the dat time in the text box and clicks the button again the error message still is shown.
Why is the button click not seeing the data that has now been entered in the form?