Removing spaces from a text field

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

I have a text field that I want all of the spaces removed. The "Substitute"
function in Excel performs exactly what I want to do however I can't seem to
find an equivalent function in Access. Anyone?

Also, how come in Access 2000, when one chooses a function then hits the
help button, it dosn't show help on that function. Just curious as it sure
is a pain in the ass not being able to get help on Access Functions.

Thank You
 
Charles said:
I have a text field that I want all of the spaces removed. The "Substitute"
function in Excel performs exactly what I want to do however I can't seem to
find an equivalent function in Access. Anyone?

Also, how come in Access 2000, when one chooses a function then hits the
help button, it dosn't show help on that function. Just curious as it sure
is a pain in the ass not being able to get help on Access Functions.

Such a function should not be hard to write. A2K, hmm, is there a
Replace() function? (You probably have to check the VBA reference).

Choosing a function? How? In the ... builder?
Maybe you don't have Help for Visual Basic for Applications installed?
 
From a post by Dirk Goldgar, Access MVP:

The Replace function works in Access 2000 VBA, but it can't be used directly
in queries. You need to create a user-defined "wrapper" function that
receives arguments of the appropriate types, passes them on to the Replace
function, and returns the Replace function's result. Here's one:

'---- start of code ----
Function fncReplace(strExpression As String, _
strFind As String, _
strReplace As String, _
Optional lngStart As Long = 1, _
Optional lngCount As Long = -1, _
Optional lngCompare As Long = vbBinaryCompare) _
As String

fncReplace = Replace(strExpression, strFind, strReplace, _
lngStart, lngCount, lngCompare)

End Function
'---- end of code ----

Access 2000 Help is considered, as you described it, "a pain in the ...", by
nearly everyone who uses it.
 
You can use the Replace function. Look in Help.

Sorry, I couldn't resist. Access Hellp has been any help since 97. For VBA
help, you have to be in a code module. You can find Replace in Help by
typing 'Function' into the Index and then scroll down the list till you come
to Replace.
 
Thanks Roger for the help on the "A2K HELP" but I still couldn't find the
help I was looking for. It seems I remember in one of the Access versions
you had the ability to highlight a function in the expression builder, click
on help, and wallah, it would lead you right to how to use that function.
What happened to that Idea Microsoft?

Little miffed here :-(

Thanks for tryin to help yawl, happy computing
 
Back
Top