Results 1 to 6 of 6
  1. #1
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14

    problem with import of value with sign

    Hello,


    I am trying to import some data from a text file. This file contains some values.
    This is how the text file is structured:

    AAA+0000000000006000,00-0000000000000233,50
    BBB+0000000000000000,00+0000000000000112,68
    CCC+0000000000000000,00+0000000000000296,39


    I have created a table in my DB with 3 columns.
    1 text column and 2 value columns (I have also tried with 2 number colums).
    When I try to import the data in my table I have problems with the value with + sign.
    The import accept only value with the - sign.

    Someone can help me?

    Thanks, Nello

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    perhaps explain what your import should look like when imported and what you are actually getting.

    Also clarify this

    I have problems with the value with + sign
    could mean anything - do you have something against + signs? causes an error? get's ignored? imports in a green color?

  3. #3
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14
    This is what I have after the import:

    Click image for larger version. 

Name:	img1.png 
Views:	6 
Size:	3.9 KB 
ID:	27236

    As you can see, I only have the negative value in the table.
    The others 5 values have "Type Conversion Failure".

    I would like to import, for example, "+0000000000000112,68" and see in the table "€ 112,68"

    I hope I have been clearer now,
    Nello


  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    OK, may have some issues with the decimal identifier, because usually it is a '.' rather than a ','. It's usually handled based on the local language but perhaps not here

    I think basically you are identifying the columns based on the + or - character? but the - character also means a negative number.

    So the first thing I would suggest is modify your text file to use proper delimiters - perhaps a semi colon or a pipe (|) which would be inserted before the - sign and replace the + sign

  5. #5
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14
    I've tried to replace all the signs + with " " and now it works.
    So I think the problem is the sign + before the value.
    But I don't understand why

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    without seeing your actual code, I suspect it is because the + sign can be used for adding values but also for concatenating strings and the + was confusing access. Any number without a - in front of it is automatically deemed to be positive so access was probably thinking it was dealing with a string, particularly as the next character is a 0 and numbers do not start with a 0

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

Similar Threads

  1. Import from Excel problem
    By RLehrbass in forum Access
    Replies: 3
    Last Post: 08-07-2015, 08:20 PM
  2. Import CSV file problem
    By gg80 in forum Import/Export Data
    Replies: 6
    Last Post: 10-01-2013, 04:06 PM
  3. Sign Out and Sign In Student Database
    By jamiers in forum Forms
    Replies: 6
    Last Post: 08-29-2012, 02:03 PM
  4. Replies: 35
    Last Post: 09-19-2011, 10:13 AM
  5. Import problem
    By rickscr in forum Import/Export Data
    Replies: 0
    Last Post: 03-28-2011, 05:09 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