Anyone know what the space character is represented as in VBA?
I'm trying to run a replace function to replace all space characters with underscores.
-
Dim newCaption As String
-
newCaption = Replace(caption, " ", "_")
-
that will work as is....provided the variable
caption has something assigned to it as a string value already.
I am guessing here but....Is the word
caption the property of a screen control ie a label or the forms caption because if that
is the case the word
caption should be referenced properly! (ie: Me!Label.caption or Me.caption in the case of a form itself) so that we can understand it much better as being that.... rather than being an apparent 'variable' by your posting. If
it is a variable then you should really steer clear of defining variables that have same names as properties in favour of naming it something less similar to avoid confusion.
Regards
Jim :)