remove spaces between numbers in an access field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Try this --
Replace([cardnumber]," ","")
You might also have dashes to maybe use this --
Replace(Replace([cardnumber]," ",""),"-","")
 
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
 
Back
Top