Remove Dash

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

Hi All,

I have a table with tracking numbers. Some have dashes in the number and
others do not. I have a query that I built based on the table to remove the
dash. However when I use the Replace function I get an Error# for every
record that had a dash.

Tracking: Replace([PRO NBR],"-","")

List of Pro Nbr
389000233
389000322
389000123
198-186687
198-196672
389100124

Any suggestions?
 
F

fredg

Hi All,

I have a table with tracking numbers. Some have dashes in the number and
others do not. I have a query that I built based on the table to remove the
dash. However when I use the Replace function I get an Error# for every
record that had a dash.

Tracking: Replace([PRO NBR],"-","")

List of Pro Nbr
389000233
389000322
389000123
198-186687
198-196672
389100124

Any suggestions?

What version of Access are you using?
I believer Replace() was first introduced in Access 2000.

If your version includes Replace, check your references for any marked
Missing.
 
M

mattc66 via AccessMonster.com

Disregard - I found out the error was caused when the PRO number was blank.

Matt
[quoted text clipped - 14 lines]
Any suggestions?

What version of Access are you using?
I believer Replace() was first introduced in Access 2000.

If your version includes Replace, check your references for any marked
Missing.
 
J

John W. Vinson

I have a table with tracking numbers. Some have dashes in the number and
others do not. I have a query that I built based on the table to remove the
dash. However when I use the Replace function I get an Error# for every
record that had a dash.

What version of Access are you using? Not all versions let you use Replace()
in queries.

John W. Vinson [MVP]
 

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