Strip periods

  • Thread starter Thread starter Nathan Guill
  • Start date Start date
N

Nathan Guill

I need to strip all the "." from a string for a routine I created to open a
document based on what is in the current form. Does anyone know how to do
this?

I.E. I have the string "A.E.G. Srl" I need to strip all of the periods in
that string. I don't want anything to take its place, but if that
functionality is there, I'm sure it could be used in the future.

Thanks.
 
Nathan Guill said:
I need to strip all the "." from a string for a routine I created to
open a document based on what is in the current form. Does anyone
know how to do this?

I.E. I have the string "A.E.G. Srl" I need to strip all of the
periods in that string. I don't want anything to take its place, but
if that functionality is there, I'm sure it could be used in the
future.

Thanks.

If you are using Access 2000 or later, the built-in VBA Replace()
function can do this:

?Replace("A.E.G. Srl", ".", "")
AEG Srl

Note that, in the first released version of Access 2002, the Replace
function could be called in VBA code but not directly from a query.
That was fixed with a service pack.
 
Access 2003 VBA has a function called Replace which replaces occurrences of
sub-strings within a string with other text (which can be a zero length
string ""). Look for help on the Replace function from within the VBA editor.
 
Back
Top