Text Box with Input Mask Error

jeffreyccs

New member
Local time
Today, 11:02
Joined
Nov 10, 2012
Messages
29
Hi

I have a form that requires users to enter a starting time for an event in a textbox which is written to a table using code attached to a command button. The textbox has an input mask for hours and minutes and after the write has been completed I want to clear the value from the text box. However I get an error message saying that "You can't assign a value to this object". I suspect that as the textbox is unbound this relates to the use of an input mask, but cannot find any references on search engines.

I would be interested to know if anyone has come across this behaviour and if there is a workaround for it.

Regards

Jeff
 
maybe you are entering a value greater than 23:59
 
No.
I have just created a unbound textbox with an input mask of short time and used a button to clear the control?
Me.txtTime = ""
 
Is the textbox control source based on an expression?
 
Hi Everyone

Thanks for your time, I have just gone through everything and found out that I made a typo in the fairly lengthy textbox name and that caused it to create an error when referring to what was an incorrect name.

I am sorry to have wasted your time and apologize

Thanks again

Jeff
 
t I made a typo in the fairly lengthy textbox name
That implies one or more of the following:
a) you don't use Option Explicit (but absolutely should)
b) you use Me! and not Me.
c) some combination of the above and you do not compile your code after making changes.

Post back if you have questions on any of those points, or better yet, do some research to further your knowledge.
Nice to know you found the issue though.
EDIT - forget the 'combination' inference. If you use Option Explicit a typo like that should raise a compile error regardless of whether or not you manually compile your code because that would get caught automatically.
 

Users who are viewing this thread

Back
Top Bottom