Results 1 to 11 of 11
  1. #1
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92

    Question Number showing in wrong format

    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?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  3. #3
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92
    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.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  5. #5
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92
    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.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  7. #7
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92
    Ok. So easy solution is just to change to text field. I'll do that.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Quote Originally Posted by June7 View Post
    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.
    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.




  9. #9
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92
    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?

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Quote Originally Posted by Douglasrac View Post
    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.

  11. #11
    Douglasrac is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    92
    Ok, good to know. Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report Showing ID number and not the name
    By tipopilotas in forum Reports
    Replies: 11
    Last Post: 07-20-2015, 03:21 PM
  2. Replies: 1
    Last Post: 02-22-2011, 03:05 PM
  3. Replies: 1
    Last Post: 03-19-2010, 05:17 PM
  4. Email created from Access is in the wrong format
    By Stick in forum Programming
    Replies: 0
    Last Post: 09-25-2006, 12:48 PM
  5. Week number wrong
    By Nikki17 in forum Queries
    Replies: 6
    Last Post: 03-18-2006, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums