Convert Access 2010 to older versions

一个人想着一个人 提交于 2020-01-14 14:12:05

问题


I want to be able to convert a Access 2010 database to multiple different older version by using a script

So if I feed a 2010 Access to the script I want it to spit out one of the following versions: 2000, 2002, 2003 or 2007.

How is this possible?

I'm not looking for a complete script, but more a pointer in the right direction or perhaps an example of how it can be done.

* EDIT *

TmpName = Destination & "\" & dbDisname & "_2002.mdb"
If Dir(TmpName) <> "" Then
   FS.deletefile TmpName
End If
objAccess.ConvertAccessProject strSourcePath & dbCurrent, TmpName, acFileFormatAccess2002
TextName = dbDisname & "_2002.mdb"
objAccess.Quit

Problem is that I get a "Run-time error '52': Bad file name or number"

But the paths are correct?

  • strSourcePath & dbCurrent = "C:\new.accdb"
  • TmpName = "C:\new_2002.mdb"

回答1:


You can use:

ConvertAccessProject "z:\docs\test.accdb", _
         "z:\docs\test.mdb", acFileFormatAccess2000

You are likely to get all sorts of error messages, which I have not attempted to sort out, but you will end up with an Access 2000 mdb. other formats are available through intellisense.

Microsoft references:
File format
ConvertAccessProject
Some possible problems



来源:https://stackoverflow.com/questions/13469683/convert-access-2010-to-older-versions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!