Solved Subscript Out of Range error when importing back tables (1 Viewer)

tcneo

Member
Local time
Today, 18:15
Joined
Dec 7, 2021
Messages
68
So I'm trying to reset my database.

So I exported most of the tables. Then I saved the database as a template and created a new database based on the template.

When I try to import the (exported) tables back in, some of the tables imported in with no issue, but some of them failed with the "Subscript Out of Range" error.

Given that I had not made any changes to the exported tables, why can't it be imported back in? Did I miss out something?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:15
Joined
May 7, 2009
Messages
19,247
are there any nulls on the PK fields you are importing back?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:15
Joined
Feb 28, 2001
Messages
27,194
In what format did you export the tables?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:15
Joined
May 7, 2009
Messages
19,247
i don't think remarks/description field is pk?
on the table (design view) is the field remarks "required" to have a value.
 

tcneo

Member
Local time
Today, 18:15
Joined
Dec 7, 2021
Messages
68
I still can't figure out what is wrong.

I have attached the files here in a zip for anyone to look.

Description of files:
1) Test Planner - tables loaded. This is the original database
2) Test Planner - Blank created from template. I took file #1, saved as a template and created a new database from this template to create file#2
3) excel files. These are the excel files I exported from the Test Planner (file 1).

I can import the following excel files back in: analyst_details, instrument_type & product_table

analyst_availability and analytical_method will generate key violation errors.

instrument_table will generate "subscript out of range" error.
 

Attachments

  • Test Planner.zip
    858.1 KB · Views: 197

tcneo

Member
Local time
Today, 18:15
Joined
Dec 7, 2021
Messages
68
Check this url

Thanks for sharing the link but it did not help with my issue.

The link mentioned the following 6 areas, i have added my comments particular to my case.
  • In an Excel spreadsheet presence of an excessive number of columns.
    • I checked. no extra columns. in the first place, the excel file were exported from the database itself. i don't understand why i can import some of the tables back in but not the others.
  • There could be some Excel files corruption issue occurred.
    • I checked to the best of my ability and do not know of any corruption. I have shared the files in an earlier post.
  • Access is unable to translate the calculated or formatted Excel fields.
    • Similar comment to the first, the excel files were exported from the database itself. if it was a formatting issue, all tables should be affected?
  • Using the disabled Macros of Excel into Access.
    • Macros not disabled.
  • Making use of the tool wizards while designing queries or any other objects.
    • I think this point refers to importing queries from Excel? not applicable in this case.
  • The occurrence of some error code in Macros programming or VBA coding.
    • not using macros or vba to import in this case. straight-forward attempting to import using the access import button on the ribbon.
 

tcneo

Member
Local time
Today, 18:15
Joined
Dec 7, 2021
Messages
68
Update:

I managed to import the problematic tables via the csv route instead.

Looking at the csv files vs the excel, it seems like the date fields were exported in "d/m/yyyy" but access requires "d/m/yyyy h:mm:ss" in order to import, text qualifiers (") were somehow missing for text fields too.

Phew, now I can move on to fix other issues and implement more features.

Thanks everyone for helping!
 

Users who are viewing this thread

Top Bottom