but textbox is holding a date... I have a textbox that is set to be format = Short Date
One could also use Me instead of the Forms reference if we're in the form module.
How to "capture" it depends on what you want to do with it:
- debug.print Me.date1
- Msgbox Me.date1
- var1 = Me.date1
Note that .Value is the default property for a textbox, so Me.date1.Value is not required.
Why would you set a variable to a String if you want to assign a date value to it? Shouldn't the variable be As Date, or a Variant if you expect to assign it a Null value?
BTW, the .Text is a property that holds the visible value, which is not always the current value. For example, if the control contains Dog and you enter Cat and check the .Text value in the BeforeUpdate event, the Text property holds Cat, while the .Value property holds Dog.
Last edited by Micron; 03-15-2017 at 06:58 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.