Format question

  • Thread starter Thread starter Rpettis31
  • Start date Start date
R

Rpettis31

I have a form that has an autogenerated number which I have the default value
as CSI000000 so when new instances of the form are created it increments.
There is a review form command button on this form that can be generated and
passes values to the review form such as the CSI number. My question is that
the value passed is on the number such as 1 rather than CSI000001.

How do I correct this?
 
Hi,
a number can be thought of as 2 different things.
There are numbers that you can do arithmetic with and there are strings of
numbers such as credit card numbers that are not used for arithmetic.
In Access, if you want a number that you can use for arithmetic, you must
use the number data type.
If you want a string of numbers for a credit card number or product number,
you would use a text field.

If you have a string of numbers in a text field, you can have leading zeros
like 00025, but you can't have leading zeros in a number data type.
How would you do arithmetic on 0000525 + 00478?

So if you want pass 0000001, you need to use a string data type.
If you want to store 00001, you need to use a text data type.

Jeanette Cunningham
 
Back
Top