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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to save Access 2007 in 2000 format

Status
Not open for further replies.

meljunk

Programmer
Sep 11, 2012
7
IE
Hi all, currently I have to open my Microsoft Access 2007 database and Save As 2000 format, can I automate this?
 
Since it can't save a different version to itself, it is not really possible to do it from the database you are in. There are number of ways to work around it, most common is to simply create a 2000 copy that you then run code from your 2007 to do all the necessary data updates to the tables in the 2000 version. Microsoft doesn't want to make any of this easy, they want you to upgrade.
 
OK, instead I'm creating a database in 2000 format and exporting the required tables. However when I create the database using:
Code:
Set db = CreateDatabase(new_database, dbLangGeneral, dbVersion40)
It creates it in 2002/2003 format

I have also tried forcing the Default Format to 2000 using
Code:
Set accapp = New Access.Application

PrevSetting = accapp.GetOption("Default File Format")
accapp.SetOption "Default File Format", 9         ' set default format to 2000
accapp.OpenCurrentDatabase new_database
accapp.CloseCurrentDatabase
accapp.SetOption "Default File Format", PrevSetting ' reset it to current format
Set accapp = Nothing
But still database is 2002/2003 format. I need it in 2000 format.
 
Sorted
Code:
    Set db = CreateDatabase(CopyDatabase, dbLangGeneral, dbVersion40)
    db.Close
    Set db = Nothing
    
    Application.ConvertAccessProject CopyDatabase, new_database, acFileFormatAccess2000
 
Since that code works in 2003, I would assume that 2007 simply does not support the creation of 2000 format databases.

Why don't you just install Access 2003 and make one?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top