Solved

Access 2003 DB Compile Fails On Too Many table Ids

Posted on 2014-04-27
10
546 Views
Last Modified: 2014-04-28
Hi Experts,
I have a large MS Access 2003 MDB.  The one MDB contains multiple distinct Modules each of which has its own Main Menu form.
In trying to compile it into a MDE it fails on too many open TableIDs for the MS Jet DB Engine V4.0.

What is the best method to overcome this problem?  With each Module being quite distinct I could put each Module in a separate MDB / MDE and open them from a MDB / MDE containing the Application Main Menu.  If so what code do I use to start them up?

Is there a better way to overcome this problem?

Thanks.
Bob Collison.
0
Comment
Question by:Bob_Collison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40026137
Before attempting to create an MDE compile the code from the Visual Basic Editor (Debug->Compile), this error may mean that you have compile error(s) in your code, once corrected you should be able to create the MDE.

It may also be caused by corruption, try doing a Compact and Repair (Database Utilities->Tools).

If none of the above suggestions work, create a new db and import all objects from the original file.
0
 

Author Comment

by:Bob_Collison
ID: 40026224
Hi Marco,
Normally I do a Debug > Compile and cleanup any issues before doing a Compact / Repair followed by a Make MDE but in this case I missed doing it.  There was a compile error which I fixed and it created the MDE.

However, I do have a large number of Tables, Reports, Forms with a lot of development still to go so I may yet run  into this problem.  Therefore I would still like to know what my options are especially for running each Module as a separate MDE from a Common Module in MS Access.

Suggestions?

Thanks.
Bob Collison.
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 40026235
Not a good idea! You won't run into this error because you have to many objects in your db.
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 40
ID: 40026238
What do you mean when you say that each module has its "Main Menu form". A module does not have such thing as a menu or a form, it's only a container for code.
0
 

Author Closing Comment

by:Bob_Collison
ID: 40026240
Thanks for the solution and information regarding too many Objects.
0
 

Author Comment

by:Bob_Collison
ID: 40026324
Hi James,

The whole Application has 10 Application Modules based on 'Subjects'  e.g.  Member Module, Finance Module, Event Module, etc. based on Subject DB Design (as opposed to Application DB Design.  Each of these has a Form Object that provides access to and control of that Module.  In addition there is an overall Application Menu Form Object from which the Application Module Menus are run.  Although there is some Common Tables for lookups etc. (e.g. Address Master based on relational concepts) most of the data relating to a Subject is controlled within that module.  Each Module has its own Back End DB for its data.  This allows Users to have multiple copies of each Module DB.  A Utility provides for the rapid switching / linking from one Module DB copy to another.

Thanks.
Bob Collison.
0
 
LVL 58
ID: 40026926
Bob,

Couple of comments to add in:

1. I would have tried using /decompile, just to make sure everything was good.
2. I would have gone through the DB and ensured that any form which had no code had it's "HasModule" property set to false.
3. If this was on the 64 bit edition of Office.   The 32 bit edition doesn't seem to have as many issues.

Jim.
0
 

Author Comment

by:Bob_Collison
ID: 40027104
Hi Jim,
Thanks for the comments I'll keep them in mind for the future.  Normally as I complete each bit of development I save it, Compact / Repair and then Compile.  If it compiles I keep a copy of the Source as a backup in case I run into issues.  If it doesn't compile I debug it or if necessary revert to the backup and start over (doesn't happen often).

I am developing on a 64 Bit Windows 7 Pro PC with Office 2010 Pro installed except for MS Access.  The MS Access that I am using / developing in is Office 2003 Pro and for installations I provide the MDE Version along with MS Access 2003 Pro Runtime via InstallShield.

Before releasing the code I use FMS Total Access Analyser to review all errors / suggestions at which time I ensure that the HasModule property is set correctly for each form.

Thanks again.
Bob Collison
0
 
LVL 58
ID: 40027163
On the /decompile, that's something that is a little different.  If you've "compiled", the VBA project carries two copies of the code; source and a partial compile (VBA only does an incremental compile, not a full compile in the usual sense of the word).

Sometimes due to corruption or Access bugs, the compiled version gets out of sync with the source.  As a result, you may not be able to generate a MDE even though your code compiles fine.  

 The inability to produce a MDE almost always deals with code because a MDE is nothing more than a MDB with the source code stripped out.

You can either use /decompile (and for details, see here: http://www.experts-exchange.com/Database/MS_Access/A_2043-Decompile-What-it-is-what-it-does-and-how-to-use-it.html ) or import everything in a new DB container (only source code is copied when you do this).

That may or may not fix the issue, but often does.

Having a valid value for has module will reduce the number of table ID's required when creating a MDE and may get you past the limit, which is 2048.  That varies a bit though as it's not a hard and fast limit, which brings up another point; when you go to create the MDE, make sure you do so after just opening Access.  That way, nothing else is in memory at the time.

That can manage to eek out a few more table ID's on the limit.

Jim.
0
 

Author Comment

by:Bob_Collison
ID: 40027213
Hi Jim,
Thanks very much for the insights.  I'll use them in the future.
Thanks again.
Bob Collison.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question