Problem readin Numbers

J

John

my database has to be able to generate a VIN number. the
last 6 digits of that VIN is a serial number.

ex: 000083

the computer generates that fine, but when i read that
number to do multiplication to it, i can't get it to read
the zeros, it reads 83. i have to have those zeroes. i
realize that the above string as a number is 83, but i
need a autogenerated number, so as to not have the same
title VIN number. i am so frustrated!! thanks

John
 
J

John

-----Original Message-----


Access looks at numbers two different ways. They can be numbers, which
you can add subtract etc. or they can be characters which it can not add
multiply etc.

Assuming they are really numbers (it seems you can perform calculations
so it would seem they are numbers) then do the math you want. As far as
Access is concerned a number 00083 is exactly the same as 83, except in one
case it has been told to display the number as "00000" format. Check out
the format property in the form, report or where ever you want to see the
leading zeros.

Now if you want to make up a VIN code like 00086SL78. You can do that
also, but it gets a little more complex and can be done several ways.
OK,
the problem is that it does display the number on the
form correct, but when i read it into VB to do the math
on the numbers is where i am not getting the zeros. that
is where i need the zeros to come. each number gets
multiplied by another number, each one of them different.
 
Top