如何使用Access 2013将ADP转换为ACCDB? [英] How to convert an ADP to ACCDB using Access 2013?
问题描述
Access 2013不支持ADP.给出了一些ADP替代方案:
Access 2013 does not support ADP. Some alternatives to ADPs are given:
- 将ADP转换为链接的Access Desktop数据库.
- 将对象导入ACCDE文件,然后使用早期版本的Access创建到现有数据的链接表.
我的ADP仅包含表单,报表,宏和模块.我想在Access 2013中使用此ADP(而不是在任何早期版本的Access中使用).
My ADP contains only Forms, Reports, Macros and Modules. I want to use this ADP in Access 2013 (not on any earlier version of Access).
在Access 2013上,我找不到任何将ADP转换为链接的Access Desktop数据库或将对象导入ACCDE文件的方法.
I have not found any method to convert ADP to a linked Access Desktop Database or to Import objects into an ACCDE file on Access 2013.
如何使用Access 2013将ADP转换为链接的Access Desktop数据库或将对象导入ACCDE文件?
How can I convert an ADP to a linked Access Desktop Database or to Import objects into an ACCDE file using Access 2013?
推荐答案
如何使用Access 2013将ADP转换为链接的Access Desktop数据库或将对象导入ACCDE文件?
How can I convert an ADP to a linked Access Desktop Database or to Import objects into an ACCDE file using Access 2013?
不能. Access 2013完全无法使用ADP文件.如果尝试从Access 2013中的ADP文件导入对象,则会出现以下错误:
You can't. Access 2013 won't work with ADP files at all. If you try to import objects from an ADP file in Access 2013, you get the following error:
您需要做的是
- 使用Access 2010或更早版本查找计算机,
- 使用它将ADP中的查询,表单等导入到
.accdb
或.mdb
文件中,然后 - 将
.accdb
或.mdb
文件带回Access 2013计算机,然后从那里继续.
- find a machine with Access 2010 or earlier,
- use it to import the Queries, Forms, etc., from the ADP into an
.accdb
or.mdb
file, then - take that
.accdb
or.mdb
file back to your Access 2013 machine and continue on from there.
编辑回复:评论
是否无法使用Access 2013将ADP转换为链接的Access Desktop数据库
Is there is no way to Convert the ADP to a linked Access Desktop Database using access 2013
显然不是.甚至尝试使用VBA将Form对象从.adp
文件复制到.accdb
文件都失败.以下代码:
Apparently not. Even trying to use VBA to copy a Form object from an .adp
file into an .accdb
file fails. The following code:
Option Compare Database
Option Explicit
Sub adpImportTest()
Dim dbPath As String, formName As String
On Error GoTo adpImportTest_Error
Debug.Print "Try importing a form from an .accdb file..."
dbPath = "C:\Users\Gord\Documents\accdbTest.accdb"
formName = "myCustomers"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acForm, formName, formName
Debug.Print "Import succeeded."
Debug.Print
Debug.Print "Try importing a form from an .adp file..."
dbPath = "C:\Users\Gord\Documents\NorthwindCS.adp"
formName = "Customers"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acForm, formName, formName
Debug.Print "Import succeeded."
Exit Sub
adpImportTest_Error:
Debug.Print Err.Description
End Sub
...产生以下结果:
...produces the following result:
Try importing a form from an .accdb file...
Import succeeded.
Try importing a form from an .adp file...
The search key was not found in any record.
如果我们试图偷偷摸摸并将.adp
文件重命名为.mdb
,则Access 2013将不会读取它:
If we try to get sneaky and rename the .adp
file to .mdb
then Access 2013 won't read it:
正如我所说,您需要使用Access 2010(或更旧版本)将对象从.adp
文件提取到.accdb
或.mdb
文件中. 然后,您可以在Access 2013中使用.accdb
或.mdb
文件.
As I said, you need to use Access 2010 (or older) to extract the objects from the .adp
file into an .accdb
or .mdb
file. Then you can work with the .accdb
or .mdb
file in Access 2013.
这篇关于如何使用Access 2013将ADP转换为ACCDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!