Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting MDB to Tables and the rest 1

Status
Not open for further replies.

alley

Programmer
Feb 8, 2000
51
0
0
US
I have been trying to split an MDB and I get
'subscript out of range' and 'invalid procedure call or argument'.

True to form, there is no clue as to where
these errors are, or if they are ACCESS errors, not mine.

I have searched the code, but can't find
either error.

This is a live application, and I can't be updating or adding reports if I wipe out their tables.

Any suggestions?
 
alley,

I do not believe you can split a 'live' database. Try making a (private) copy and doing your expiriments on that.

MichaelRed
There is never time to do it right but there is always time to do it over
 
By 'live', I mean I can't take my MDB and load it on their system. It would replace
the real tables with all my test data. Which is the reason to split in the first place,
separating tables from the forms, queries, reports and code.

Anyway, thanks for your response.

alley
 
You don't say what you're doing when you receive the error.

First..before you begin..make a backup copy and store it in a safe place on your harddrive.


1. Create a new database called (say) Backend.mdb
2. On Menu (F)ile; (G)etExternalData; (I)mport. Choose your current database
3. click each one of your data tables. Leave any lookup type tables (that You as developer may want to change) in the frontend.
4. When the tables have been imported, close the Backend.mdb, and open up your existing database.
5. Delete all the tables that you imported into the Backend.mdb. (be vewy, vewy careful).
6. Compact your existing database... now the frontend.
7. On Menu (F)ile; (G)etExternalData; (L)ink. Point to your backend.mdb and click on each of the tables.

Now you're done. Test to make sure it works. If on a network, put the Backend.mdb on the server, and give each of your users a copy of the frontendfile.

Good luck
 
First things first, you need to make sure that every single Sub and Function have Error-trapping (eg: On Error Goto Err_Button_Click), even if you think that the Sub can't possibly produce an error (Access can trip up ANYWHERE).

Make sure you have a msgbox popping up when an error occurs providing yourself with all the info you need to track the error:

[tt]MsgBox "Err No: " & Err.Number & ". Description: " & Err.Description & " In Sub GetCompanyDetails", vbInformation, "An Error Occurred!"[/tt]

BTW, this still may not change the error you get, so make sure you have the code 'Option Explicit' at the top of each objects' code, which will force Access to make sure all your variables have been declared before use (checks for this during compile), after that I'm afraid your on yer own, as I get the same 'Invalid sub or procedure call...' error every time I use Package & Deployment Wizard, and nobody here knows what I can do that I haven't already done...
 
Halifax and ahdkaw,

Thanks for your responses.

The error occurs during the Split operation. The errors it gives are in my first note.

There are NO arrays in the data. FOR loops are not entered if the To variable is zero.
All variables are declared, but Option Explicit is a good idea, just to make sure.

I have no explicit (my own) functions, unless Access uses hidden ones I don't see.
The application works without errors; I trap (in my code) obvious inconsistencies.

I have checked all macros even though there are no parameters except form and report names.

I will try the 'manual split' which never occurred to me.

Again, thanks.
 
ahdkaw,

'Manual Split' procedure works beautifully. Results perfectly normal as before split.

Really Thanks. You might want to make this an FAQ.

alley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top