Originally Posted by
ItsMe
IIRC, you can use dot and then the underscore. Alternatively, you can use the bang and brackets. I believe they may be interchangeable. However, I reserve using the brackets with for the bang and DAO.
rs![SomeCollumnName]
Then, when referencing control names ...
Me.A_Control_Name_With_Spaces.Value
Of course, you can use the bang and brackets. However, you may not be looking at the control and you may be looking at the field, instead.
I do not believe the following will work
Me![TextBoxName].Text
I did not know that. I know that in lieu of spaces, many use the underscore as a separator, and that if spaces are used in an object name, it has to be enclosed in square brackets. I figured that if the designer used a space in a control name (Me.[My Control]) it could not simply be replaced with Me.My_Control as you did. I guess I learned something. For those who want to know more about the bang vs dot operator, I have adopted this as gospel until somebody proves different
http://bytecomb.com/the-bang-exclama...erator-in-vba/
According to it, the reason for your (I believe) correct statement re Me![TextBoxName].Text, it would be because [TextBoxName] is not the default member of a form.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.