Results 1 to 9 of 9
  1. #1
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231

    Sometimes get subscript out of range

    I have a table that I replace from time to time. It is easier and less time consuming to replace than to update. The file I am importing is an Excel file with about 3,000 records. When I first import the file it gives me a table that I can use for other updates. The initial import is about 2,000 records. I will delete the records from the table, import the file to append to the table, and that is when I get subscript out of range. I have another table I do exactly the same with about 2,600 records with no problem; this table has 3 fields to import. The former table has 99 fields. WHy does one work and the other not?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    First thing I'd look for are values that exceed the limits specified in the destination table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    If I see the code line that fails , I could guess better.
    But if you are running a delete query to empty the table, you will never get this error.

  4. #4
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    THe values are always the same. The import is to get new records. I have no way of know what is new until I compare the data to what is already in the DB. The files contains names and addresses and associated codes to identify certain and specific needs and requirements. The code fields are 2 to 10 characters.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db and spreadsheet here for testing?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    In trying get a redacted DB for testing, the error won't repeat; it's working fine. When it happens again I'll be sure to send the DB at that time. Thanks.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It's like when your car never makes the sound when you bring it to a mechanic. As soon as you leave it starts up again.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    Happens to you too!

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I've been on both ends of it. Can't tell you how many times somebody has asked me to come look at something acting up on their computer and everything works perfectly when I'm watching.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Subscript out of Range in Access 2010
    By jenngee in forum Import/Export Data
    Replies: 2
    Last Post: 11-26-2013, 10:30 AM
  2. subscript out of range
    By philfer in forum Access
    Replies: 3
    Last Post: 08-17-2013, 01:22 PM
  3. subscript out of range error
    By adray13 in forum Import/Export Data
    Replies: 4
    Last Post: 05-24-2013, 02:26 AM
  4. Subscript out of range (9)
    By msche398 in forum Programming
    Replies: 1
    Last Post: 07-08-2011, 12:52 PM
  5. Database Split - Error Subscript out of range
    By Huddle in forum Database Design
    Replies: 7
    Last Post: 07-16-2010, 01:52 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