remove spaces between numbers in an access field

A

AngieSD

I am creating a file for a FTP card merchant to process credit card charges
out of an accounting system. The problem I have encountered is that the
accounting system does not restrict the format or length of the credit card
number. I need to send the number as 1234123412341234, limit 20 characters,
no spaces. The cards are mixed in the table, sometime as above sometimes as
1234 1234 1234 1234. I have tried a replace([cardnumber]," ","",1,4) but am
not getting the correct results.

Any suggestions?

Thanks so much for any help,

Angela
 
K

KARL DEWEY

Try this --
Replace([cardnumber]," ","")
You might also have dashes to maybe use this --
Replace(Replace([cardnumber]," ",""),"-","")
 
A

AngieSD

Great, that seems to do the trick, I thought I need the character start and #
to replace arguments. Thanks!

KARL DEWEY said:
Try this --
Replace([cardnumber]," ","")
You might also have dashes to maybe use this --
Replace(Replace([cardnumber]," ",""),"-","")

AngieSD said:
I am creating a file for a FTP card merchant to process credit card charges
out of an accounting system. The problem I have encountered is that the
accounting system does not restrict the format or length of the credit card
number. I need to send the number as 1234123412341234, limit 20 characters,
no spaces. The cards are mixed in the table, sometime as above sometimes as
1234 1234 1234 1234. I have tried a replace([cardnumber]," ","",1,4) but am
not getting the correct results.

Any suggestions?

Thanks so much for any help,

Angela
 

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