Can't compile - Error 17

  • Thread starter Thread starter Renny Bosch
  • Start date Start date
R

Renny Bosch

After doing a lot of coding and compiling and running and testing, all of a
sudden when I click Debug|Compile I get an error saying "Can't perform
requested operation." (When I click Help on that dialog it says that is
Error 17, but gives me no clues about how to fix it.) I also noticed that
the menu item says "Compile Games.mdb" when in fact my file is named
Games3.mdb".

I am using Access 2002 on Windows XP. I have run Compact and Repair
Database, restarted Access, even restarted Windows, but no change.

Do I have to try reinstalling Access, or is there a better way?
 
I'm running Access 2002 on Win98 and have run it on WinXP.
When I get strange things like this that can't be
explained, it sometimes helps to rebuild the entire
database by:
1. Create a new empty database.
2. Import all objects (tables, forms, queries, etc) into
it from the problem database.
3. If you have any special references, you'll need to re-
add them.

Microsoft's KnowledgeBase has an article that helps
explain the process and reasoning, tho it applies to a
different situation. Just look for the word BLOAT for
Access there.

John Loewen
 
Thanks John. I checked the KB article re. database Bloat, and see that one
solution is to use Access 2000 format. Do you know if there is any downside
to using that instead of Access 2002 format?
 
Just that some features in Access 2002 aren't compatible with 2000. I have
developed an extensive application in Access 2002 with an Access 2002
database file. When I ran into this, I tried switching it to an Access 2000
database and suddenly much of my application was not working as designed.
Rather than analyze it, I just vowed to make 2002 work and went back to it.
I must have used a number of Access 2002-only features.

I was apprehensive about rebuilding it, but I worked my way through it and
solved the resulting problems, documenting them as I went. I've since
re-built the app several more times (due to bloat) and its fairly simple. My
steps are:

1. Open a new empty database in Access 2002 format.
2. Import all objects into the new database.
Be sure to open Options and include Menus and Toolbars.
(I have created a custom menu and some custom toolbars.)
3. Add any VB references to special libraries used by that app.
In the VB Editor, to to Tools, References, and add the ones required
(Open the References list in the old app first to note which ones
are checked and their order.)
4. In the VB Editor, run Debug, Compile to compile the code.
5. Start every Access form and close it to compile all the forms.
6. Compact and Repair the database frequently.
(Watch the size of the mdb file in Windows Explorer or My Computer.)

Hope this helps!
John Loewen
 
Back
Top