Strip periods

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.
 
D

Dirk Goldgar

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.
 
A

agodfried

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top