I have a field that is;
Type: Number
Size: Double
Format: General Number
Decimal: 0
I insert number like this: 6042001354531
And it is showing like this: 6,042001354531E+12
Why? How can I make it show correctly?
I have a field that is;
Type: Number
Size: Double
Format: General Number
Decimal: 0
I insert number like this: 6042001354531
And it is showing like this: 6,042001354531E+12
Why? How can I make it show correctly?
The field might be set with Scientific format. If so, change to General or nothing and see what happens.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
No its not. As I said in my first post the format is General Number.
I just changed to Scientific, saved and back to General Number and nothing changed. Access is going crazy?
Maybe the problem is in the size? Double and should be Long Integer?
How can I safely change to Long Integer? Because Access say I will lost the data in it, and then how can I put it back without needing to retype everything again?
P.S.: Ok, that is not the case. I just did it, and with Long Integer I can't put the number I need. I need a field that will accept number up to this size: 010274314857478 (so 15 characters)
I think Double was a good choice.
Sorry, I missed that in your first post. I just tested your numbers in a Double datatype and they display fine. Of course, the leading zero is not retained because this is a number field. So is this a number or some kind of ID entity?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes, its ID. The first 0 shouldn't go away, but its not a problem that it does, I know when the zero is there.
Then this is not a number, ID's, even if they are composed of only digits (eg. SSN's, zip codes, phone nums - all without the hyphens saved) should be in a text field. This will retain the leading zero.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ok. So easy solution is just to change to text field. I'll do that.
Just a comment for anyone who may read this "solved" post.
As June7 pointed out,
If you have a field that contains only digits, and you do not use that field
for arithmetic, then define the field as text. Just because it contains digits only,
does not mean it is a number. As June7 listed, we have become too accustomed
to Social Security Number, phone Number,.... they are really codes or identifiers
and are best represented as text fields.
Just my 2 cents, but it seems to be a fairly common problem.
Then I would like to know what are "real" numbers.
If phone number or social security numbers should be in text fields, numbers are used for what? Only internal codes of Access like autonumber?
No, numbers are the things we do arithmetic on/with.
Like 5 + 3 or
17 divided by 9.
Or myRecordId +1
MyLoanOutstandingAmt - myLoanPayment
MySalary * 1.02 = new Salary
You don't do things (not normally any way) like
MyTelephoneNumber + 2000???
MyCreditCardNumber + 6 ???
My SSN divided by 2?????
Oh, you can call it a number if you wish. But just be aware of a few of these things.
It's a little bit like O (oh) and 0 (zero). They look sort of the same to you and me, but the computer and Access understands the difference.
Ok, good to know. Thanks.