Log in

View Full Version : Save Database in 2000 format



meljunk
09-11-2012, 03:09 AM
Hi all,

Does anyone know how I can programmatically save a database in 2000 format?

Thanks in advance,
Mel.

meljunk
09-11-2012, 04:22 AM
I have a program that creates a copy of a selected database and does some formatting to it. I want my program to always save the database in 2000 format (regardless of what version of Access is installed on the machine). At the moment I have to manually open the database and Save As 2000 format. I want to automate this. Help please.

meljunk
09-13-2012, 03:47 AM
OK, instead I'm creating a database in 2000 format and exporting the required tables. However when I create the database using:
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
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 = NothingBut still database is 2002/2003 format. I need it in 2000 format.

meljunk
09-13-2012, 04:44 AM
Sorted
'CREATES 2002/2003 format
Set db = CreateDatabase(CopyDatabase, dbLangGeneral, dbVersion40)
db.Close
Set db = Nothing

'CONVERTS to 2000 format
Application.ConvertAccessProject CopyDatabase, new_database, acFileFormatAccess2000