Results 1 to 8 of 8
  1. #1
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6

    Entering 16 digit numbers into number field

    Hi all,
    I'm currently creating a database that must hold 16 digit credit card numbers. The numbers should be formatted so that there is a space after every four numbers (eg. 1234 1234 1234 1234). When I copy and paste the card numbers into Access from Excel, I end up with "2.1528492378042E+15".

    Is there anyway around this?
    Thanks in advance.

    PS: This is for a college project, I'm not actually storing real card numbers.

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    use Text field if you need spaces in the table data,
    or Decimal if spaces only need in report.

  3. #3
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6
    Quote Originally Posted by weekend00 View Post
    use Text field if you need spaces in the table data,
    or Decimal if spaces only need in report.
    Thank you for your quick respone?

    Seems to work when I copy one at a time. When I copy multiple cells it appears as 2.1528492378042E+15.

    Is there a way of copying multiple cells from excel to access?

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    if you have spaces in between every 4 digits in Excel, it must be all right when you paste to Access (text field). it can't be converted into a number automatically.

    if you have 16 digit number in Excel...... I could not put 16 digits number in Excel, it cuts the number.

    if you want to put 16 digits in Excel, you need to set cell format to text first then input digits. in this case, you can copy cells and paste to Access(text or decimal field).

  5. #5
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6
    I have set the cell formats to text then input the digits. I then copy the cells to access but it doesnt seem to be working.

  6. #6
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    did you see 16 digits in Excel? did you paste to a text field?

  7. #7
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6
    Quote Originally Posted by weekend00 View Post
    did you see 16 digits in Excel? did you paste to a text field?
    To test it, I copied the number 3155305189456750 from Excel to Access and it appears in the text field in Access as 3.15531E+15.

    I did paste to a text field in Access.

  8. #8
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    In Excel, you need to set the cell format to text, then paste the text in or type the text in. you should see 3155305189456750 instead of 3.15531E+15 in Excel.

    if you see 3.15531E+15, you can never get back the sixteenth digit because in Excel, a number have at most 15 digits. any digit on the 16th will be set to 0. e.g. if you type in 3155305189456751, it will set to 3155305189456750.

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

Similar Threads

  1. Suggest number based on already used numbers
    By Patience in forum Access
    Replies: 3
    Last Post: 06-16-2010, 04:26 AM
  2. Replies: 2
    Last Post: 02-13-2010, 01:54 PM
  3. Setting Field Properties for Numbers
    By Tim Hardison in forum Access
    Replies: 1
    Last Post: 12-09-2009, 06:47 AM
  4. Replies: 3
    Last Post: 10-18-2009, 08:38 PM
  5. Replies: 5
    Last Post: 02-08-2006, 08:42 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