Convert 2000 format to 2000 format??

  • Thread starter Thread starter Ian King
  • Start date Start date
I

Ian King

We have been developing a fairly complex Access database in 2000 format
using Office XP and it works not badly at all.

However, we copied the db to a machine with 2000 Premium installed, and it
falls down all over the place. We've replaced the calendar controls on the
two forms that had them, and much of the broken (?) code works after simply
re-typing it.

Can anyone offer any advice or an explanation? We did compile and compact
first.

Many thanks

Ian King
 
In Access 2000, open a code window, and choose References from the Tools
menu. If any are marked as "MISSING", or any unnecessary ones are checked,
this is probably the cause of much of the heartache. More info on
References:
http://allenbrowne.com/ser-38.html

The other issue is that an MDB actually contains 2 copies of the code: the
text version that you can read, and the compiled version that actually runs.
Although Access 2002 and Access 2000 can both read the text version in a
2000-format MDB, they produce different compiled code. As a result, 2000 can
behave inconsistently if the code was compiled under 2002. Using Access
2000, compact, decompile, compact, and recompile:

1. Compact:
Tools | Database Utilities | Compact
Then close Access.

2. Open a command prompt, and enter something like this. It is all one line,
and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Make sure the msaccess.exe is the 2000 version.

3. Compact again.

4. In Access 2000, remove any spurious references, and compile again.

At this point the database should be workable unless it was more corrupted
that you thought. If it is still not working:
1. Using Access 2000, create a new (blank) database.

2. Uncheck the Name AutoCorrect boxes under:
Tools | Options | General.

3. Import everything from the problem database:
File | Get External | Import

4. Set the correct references.

5. Compile.
 
Allen,

Many thanks for both explanation and choice of solutions.

The import-into-blank-database worked superbly! I just wonder why no
corruption is evident in the XP version.

Regards

Ian King
 
Ian King said:
However, we copied the db to a machine with 2000 Premium installed, and it
falls down all over the place. We've replaced the calendar controls on the
two forms that had them, and much of the broken (?) code works after simply
re-typing it.

Calendar control? Get rid of them.

See the Calendar Tips page at my website
http://www.granite.ab.ca/access/calendars.htm

There could, likely will, be lots of version problems when you go to
distribute the MSCal.OCX..

One alternative is MonthCalendar is a completely API generated Month
Calendar derived directly from the Common Control DLL. There are
links to several downloadable calendar forms at my website. As these
are forms you can also do anything with them you want.

You can also use the calendar form which comes in the Access <insert
your version here> Developers Handbook by Litwin/Getz/Gilbert,
publisher Sybex www.developershandbook.com. These books are well
worth spending money. Every time I open one I save the price of the
book.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Back
Top