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!

Converting access 2000 to a prior version through VBA

Status
Not open for further replies.

talenx

Programmer
Aug 7, 2001
157
US
Hello,
Does anybody know how to convert an access 2000 database to a prior version and access (example access 97). through VBA
access provides a method but it doesn't seem to work correctly.

it goes something like this
'------------------------------------------------------
'this will compact the your current database.

DBEngine.CompactDatabase"olddbname.mdb","newdbname.mdb",,,vbversion30
'-----------------------------------------------------
'then you will have to delete the olddatabase

If Dir (&quot;database path\olddbname.mdb&quot;)<>&quot;&quot; then
Kill &quot;database path\olddbname.mdb&quot;
'----------------------------------------------
'Rename the new database back to the old database name.
Name &quot;database path\dbname.mdb&quot; As &quot;database path\dbname.mdb&quot;

my problem is that MS gives the option to use a dbverison30
in place of the [option] var bit it does NOT convert the database

DBEngine.CompactDatabase olddb, newdb, locale, options, password
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top