Splitting a Database in Access 2003 "subscript out of range"

G

Guest

I get the message "subscript out of range" when I attempt to split a database
in Access 2003.
 
J

Jeff Conrad

Here is a past post of mine on this issue:
Below is just some of the possible causes and resolutions to this issue that
I located. So sit back and enjoy the ride.


1. Possibly some corruption in your database.
From a post by someone at Microsoft:My name is Kerri Lipe. Thank you for using the Microsoft Access Newsgroups.

Sounds like the database contains some corruption. Import all the objects
into a new database and then test the database splitter. This should work
without errors.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Regards, Kerri Lipe
Microsoft Support

2. If you already have ANY linked tables (even one) you will receive the error.
From a past post by the Mighty Michka:If there are linked tables in ther already, this happens. The fix is to
delete the links, split, then reattach.[/QUOTE][/QUOTE][/QUOTE]


3. Could be a problem with the table relationships.
Some possible fixes by another person at Microsoft:My name is Rita Nikas. Thank you for using the Microsoft Access Newsgroups.

As I understand it, you're attempting to create a back-end for your
database in Microsoft Access. When you try to split the database (using the
Database Splitter), you receive this error message:

'subscript out of range'

After you okay the above error message, you receive a second error message:

' An error occurred while copying relationships'

You're curious how you can overcome this problem. In addition, the database
does split, but none of the tables show links to the original database.

If I understand this issue correctly, there are several things that you can
try to resolve this issue:

1. Create a brand-new, blank database and import all database objects.
Then, try to split from this *new* database.

2. What happens if you split the Northwind sample database? Does that work
fine?

3. Do you have any previously linked tables in your database (before
attempting the split)? If so, you must:

a. Unlink the existing linked tables.
b. Use the database splitter.
c. Relink the previously linked tables in the front-end database.

4. Manually split the database.

a. Create a new database
b. Import all your tables from your Front End
c. Close this database
d. Open your Front-End database
e. Delete all your tables
f. Link all your tables from your newly created Back-End database

5. Check for any unnecessary/duplicate/strange relationships (Tools menu,
Relationships). Remove any unnecessary/duplicate/strange relationships.

4. Could be a problem with integer data types.
From a past post by MVP Arvin Meyer:You'll often see that error when you exceed the limits of an integer
(-32,768 to +32,767). Check for something defined as integer that may be
close to the limits and change the datatype to long integer. This could be
in code, or a field in a table, etc.[/QUOTE][/QUOTE][/QUOTE]


5. Could be a bad installation.
From a past post by MVP Allen Browne:This error indicates that there is an installation problem.

Can't locate the article at present, but it was something like the wizard
files are not present, or the path to them was not known. You might be able
to solve the problem by using the shortcut created by Office during
installtion. If you don't have that shortcut, you could run the installation
again.

It would also be worth ensuring you don't have any missing references (Tools
| References from any code window).

Hope that's enough to get you on the right track.[/QUOTE][/QUOTE][/QUOTE]


6. Could be a problem with arrays.
From a past post by someone named James:I've seen "subscript out of range" as a compile error when an array (Redim)
has been declared with two few elements and the code is using an array
expression with too high a subscript. Ex. Redim myarray(10) is declared and
myarray(11) is referenced. The database splitter may be encounting this in
your code when attempting to recompile.

The relationship error may be due to splitting two tables where a
relationship has been saved (a guess).[/QUOTE][/QUOTE][/QUOTE]


7. Could be that security permissions are interferring.
From another past post by MVP Arvin Meyer:Yes, security sometimes gets in the way. You'll need to make sure that you
have proper permissions. It is usually advisable to build the database with
security in mind as permissions problems are often easier to work with on a
per object basis. You can set permissions globally though (provided you are
the owner or admin). You might find it easier to de-secure the database,
split it, then re-secure it. Make sure you have a good backup copy of
everything. You'll also find the security faq helpful.

http://support.microsoft.com/s­upport/access/content/secfaq.a­sp

The problem may also be as simple as needing to connect to the correct
system.mdw to get the permissions you need. The syntax from a shortcut looks
like:

"C:\Program Files\Office10\MSACCESS.EXE" "C:\Projects\App.mdb" /wrkgrp
"C:\Projects\Secured.mdw"

all on 1 line.[/QUOTE][/QUOTE][/QUOTE]


8. Could be a problem with the permissions on the wizards themselves.
From another past post by MVP Allen Browne:Coming in on the end of this thread, I believe the error is
with the wizard, but can't recall the details.

Article ID: Q164240 discusses the same error with other wizards,
and suggests a resolution of:
Grant the necessary permissions for users to create and modify the
Wzmain80.ldb file in to \Office folder on the server.
Grant the necessary permissions for users to modify the Wzmain80.mde
file in the \Office folder on the server.

In any case, a manual split is dead easy. I always split manually
as it allows more control over the process.[/QUOTE][/QUOTE][/QUOTE]


9. Some possible causes/resolutions from someone at Microsoft:My name is Kerri Lipe. Thank you for using the Microsoft Access Newsgroups.

There could be multiple issues that cause the error message you are seeing.
Do you get this error using all wizards or just the split database wizard?
Some suggestions:

1. Regsvr32 on DAO350.dll (for Access 97) or DAO360.dll (for Access 2000).
From the start -> run, your line should read:
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\daoxxx.dll" -
where x is the proper version number
2. Rename the wizards using a .old extension and then reinstall. For more
information on wizards and their locations, refer to the following:
Q208307 ACC2000: Wizard Names and Their Locations
http://support.microsoft.com/s­upport/kb/articles/q208/3/07.a­sp

Q159367 ACC97: Which Wizard Is Where in Microsoft Access 97?
http://support.microsoft.com/s­upport/kb/articles/q159/3/67.a­sp

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Regards, Kerri Lipe
Microsoft Support
I hope that helps,
--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
 
G

Guest

Thanks, I will try that. I was able to manually link the database to the
be...

Jeff Conrad said:
Here is a past post of mine on this issue:

Below is just some of the possible causes and resolutions to this issue that
I located. So sit back and enjoy the ride.


1. Possibly some corruption in your database.
From a post by someone at Microsoft:
My name is Kerri Lipe. Thank you for using the Microsoft Access Newsgroups.

Sounds like the database contains some corruption. Import all the objects
into a new database and then test the database splitter. This should work
without errors.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Regards, Kerri Lipe
Microsoft Support


2. If you already have ANY linked tables (even one) you will receive the error.
From a past post by the Mighty Michka:
If there are linked tables in ther already, this happens. The fix is to
delete the links, split, then reattach.
[/QUOTE]


3. Could be a problem with the table relationships.
Some possible fixes by another person at Microsoft:My name is Rita Nikas. Thank you for using the Microsoft Access Newsgroups.

As I understand it, you're attempting to create a back-end for your
database in Microsoft Access. When you try to split the database (using the
Database Splitter), you receive this error message:

'subscript out of range'

After you okay the above error message, you receive a second error message:

' An error occurred while copying relationships'

You're curious how you can overcome this problem. In addition, the database
does split, but none of the tables show links to the original database.

If I understand this issue correctly, there are several things that you can
try to resolve this issue:

1. Create a brand-new, blank database and import all database objects.
Then, try to split from this *new* database.

2. What happens if you split the Northwind sample database? Does that work
fine?

3. Do you have any previously linked tables in your database (before
attempting the split)? If so, you must:

a. Unlink the existing linked tables.
b. Use the database splitter.
c. Relink the previously linked tables in the front-end database.

4. Manually split the database.

a. Create a new database
b. Import all your tables from your Front End
c. Close this database
d. Open your Front-End database
e. Delete all your tables
f. Link all your tables from your newly created Back-End database

5. Check for any unnecessary/duplicate/strange relationships (Tools menu,
Relationships). Remove any unnecessary/duplicate/strange relationships.

4. Could be a problem with integer data types.
From a past post by MVP Arvin Meyer:You'll often see that error when you exceed the limits of an integer
(-32,768 to +32,767). Check for something defined as integer that may be
close to the limits and change the datatype to long integer. This could be
in code, or a field in a table, etc.[/QUOTE][/QUOTE]


5. Could be a bad installation.
From a past post by MVP Allen Browne:This error indicates that there is an installation problem.

Can't locate the article at present, but it was something like the wizard
files are not present, or the path to them was not known. You might be able
to solve the problem by using the shortcut created by Office during
installtion. If you don't have that shortcut, you could run the installation
again.

It would also be worth ensuring you don't have any missing references (Tools
| References from any code window).

Hope that's enough to get you on the right track.[/QUOTE][/QUOTE]


6. Could be a problem with arrays.
From a past post by someone named James:I've seen "subscript out of range" as a compile error when an array (Redim)
has been declared with two few elements and the code is using an array
expression with too high a subscript. Ex. Redim myarray(10) is declared and
myarray(11) is referenced. The database splitter may be encounting this in
your code when attempting to recompile.

The relationship error may be due to splitting two tables where a
relationship has been saved (a guess).[/QUOTE][/QUOTE]


7. Could be that security permissions are interferring.
From another past post by MVP Arvin Meyer:Yes, security sometimes gets in the way. You'll need to make sure that you
have proper permissions. It is usually advisable to build the database with
security in mind as permissions problems are often easier to work with on a
per object basis. You can set permissions globally though (provided you are
the owner or admin). You might find it easier to de-secure the database,
split it, then re-secure it. Make sure you have a good backup copy of
everything. You'll also find the security faq helpful.

http://support.microsoft.com/s­upport/access/content/secfaq.a­sp

The problem may also be as simple as needing to connect to the correct
system.mdw to get the permissions you need. The syntax from a shortcut looks
like:

"C:\Program Files\Office10\MSACCESS.EXE" "C:\Projects\App.mdb" /wrkgrp
"C:\Projects\Secured.mdw"

all on 1 line.[/QUOTE][/QUOTE]


8. Could be a problem with the permissions on the wizards themselves.
From another past post by MVP Allen Browne:Coming in on the end of this thread, I believe the error is
with the wizard, but can't recall the details.

Article ID: Q164240 discusses the same error with other wizards,
and suggests a resolution of:
Grant the necessary permissions for users to create and modify the
Wzmain80.ldb file in to \Office folder on the server.
Grant the necessary permissions for users to modify the Wzmain80.mde
file in the \Office folder on the server.

In any case, a manual split is dead easy. I always split manually
as it allows more control over the process.[/QUOTE][/QUOTE]


9. Some possible causes/resolutions from someone at Microsoft:My name is Kerri Lipe. Thank you for using the Microsoft Access Newsgroups.

There could be multiple issues that cause the error message you are seeing.
Do you get this error using all wizards or just the split database wizard?
Some suggestions:

1. Regsvr32 on DAO350.dll (for Access 97) or DAO360.dll (for Access 2000).
From the start -> run, your line should read:
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\daoxxx.dll" -
where x is the proper version number
2. Rename the wizards using a .old extension and then reinstall. For more
information on wizards and their locations, refer to the following:
Q208307 ACC2000: Wizard Names and Their Locations
http://support.microsoft.com/s­upport/kb/articles/q208/3/07.a­sp

Q159367 ACC97: Which Wizard Is Where in Microsoft Access 97?
http://support.microsoft.com/s­upport/kb/articles/q159/3/67.a­sp

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Regards, Kerri Lipe
Microsoft Support
I hope that helps,
--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
I get the message "subscript out of range" when I attempt to split a database
in Access 2003.
[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top