Removing a negative sign from a number

G

Gibson

I am using the following code to place a number in a text file. I open up
the file, find the data and print it to the file. The problem is if the
number is negative the first character in the field of the text file is the
negative sign (-). Is there a way to convert the number so the number
printed to the text file does not have the negative sign in front of it? I
tried the CStr function but the sign still appears.

(Format(rs!Num * 10000, "000000000000000")
 
K

Ken Snell [MVP]

Use the Abs function to remove negative signs:

(Format(Abs(rs!Num) * 10000, "000000000000000")
 

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