Results 1 to 7 of 7
  1. #1
    Ianw is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    21

    Script out of range

    Hi All,



    I am trying to import a spreadsheet into Access 2007 and I am getting the error message "Script out of Range". Anyone come across this before? Does anyone know what thi smeans?

    Thanks

    Ianw

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    What method are you using for the import? Post code for analysis. What line triggers the error?
    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
    Ianw is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    21
    I am using the spreaddsheet import wizard. I don't know what line triggers the error.

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    This is admittedly a wild shot in the dark, but - do any of the Excel column headings (if you have any) contain blanks? I recall I had problems with Excel import some time ago, and traced it to blanks.

    Are you importing to an existing table? If so, does it have any non-standard field types, like multivalue fields?

    Try importing to a new table (i.e. let Access create it) and see if the problem persists.

  5. #5
    Ianw is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    21
    Good idea. I'll try that.

    Thanks

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Note that importing Excel files into Access can be really flaky at times. Excel and Access try to communicate with each other, and Access tries to "guess" what the format of each field should be (I believe it looks at the first 10 rows of data in making that guess). Unfortunately, sometimes it guesses wrong. For example, let's day that you have a column of entries that look like numbers, but somewhere further down the page, there is a text entry. So Access may be "guessing" that this field is numeric, and then that text entry is causing issues.

    Unfortunately, Access often makes it very hard to figure out which record is causing issues. I have spent hours in the past trying to figure out where the error resides. Nowadays, if I experience this behavior, I will look for a few minutes to see if I can locate any obvious errors. If I cannot, then I will export my Excel file to a delimited text file (tab or CSV), and then import that. The beauty there is when importing text files, the Import Wizard is invoked and Access lets YOU determine the format of each field. That usually solves the problem for me.

  7. #7
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Another thing you might try is to link to the Excel file with the linked table manager, and then use an MS Access append query to transfer the data to an Access table.

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

Similar Threads

  1. Run SQL script under VBA Function
    By shabar in forum Programming
    Replies: 12
    Last Post: 03-19-2013, 11:00 PM
  2. Replies: 1
    Last Post: 08-08-2012, 02:02 PM
  3. New Line in VBA Script
    By tylerg11 in forum Forms
    Replies: 8
    Last Post: 01-04-2012, 02:01 PM
  4. Database script
    By kleclark in forum Programming
    Replies: 2
    Last Post: 02-15-2011, 11:50 AM
  5. Login Script
    By theITguy in forum Access
    Replies: 2
    Last Post: 03-06-2009, 03:37 AM

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