Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Blank in Number field from Excel Import (2000)

    I am importing a file from Excel to Access. One field is a number (long integer) data type in Access. The problem I am running across is that sometimes I have a "blank" entry in the field in Excel. The "blank" is the result of a formula in Excel (if x,"",y). When I try to import the file I get import errors in Access for any row where the "" has been used. I do not want to use a zero since I have some actual zero values. Does anyone have any solutions. Thanks.

  2. #2
    New Lounger
    Join Date
    Apr 2003
    Location
    Rio de Janeiro, Bay of Plenty, Brazil
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank in Number field from Excel Import (2000)

    Hi
    Do you have any Excel/Access VBA macros that transfer data between them ?
    Thanks

  3. #3
    Lounger
    Join Date
    Mar 2003
    Location
    Gainesville, Florida, USA
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank in Number field from Excel Import (2000)

    I have noticed the same in my imports. A blank or null cell will generate an error message because its expecting a value with a certain data type for that field. In your case a long integer. The error message just tells you that it could not copy the value because it did not match the data type. Your initial value was a long integer but the subsequent value was a null or blank. In that case that field is left blank in Access and an error message generated for that row and field. If indeed you do want to leave the field value blank then ignore the error message because it will leave it blank anyway.
    Remember that the field data type is based on the first row, col data type found for the column. For instance, if your data values change from numeric to alpha in the same column then Access will generate an error file at import time.

  4. #4
    New Lounger
    Join Date
    Jan 2001
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank in Number field from Excel Import (2000)

    Thanks so much. I did not realize it kept the entries, I thought It did not import them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •