ACC95: TransferDatabase/CopyObject in Run-Time May Corrupt ObjectID: Q158923
|
Moderate: Requires basic macro, coding, and interoperability skills.
If you use the /Runtime command-line option to open a database that uses
TransferDatabase or CopyObject to import or export a Microsoft Access
object, objects in the target database may become corrupted.
This applies to the TransferDatabase and CopyObject methods of the DoCmd
object and to the TransferDatabase and CopyObject macro actions.
Microsoft has confirmed this to be a problem in Microsoft Access version 7.0. This problem no longer occurs in Microsoft Access 97.
This problem only occurs when you are importing or exporting an object that contains a Visual Basic code module: Forms, Reports, or Modules. If you use TransferDatabase or CopyObject to import or export Tables, Queries or Macros the problem does not occur.
NOTE: In the following procedure, replace "C:\My Documents\Db1.mdb" with the correct path to the database you created in step 1.
Function TestTransfer()
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\My Documents\Db1.mdb", acReport, "Report1", "Report1"
End Function
Macro Name Action
--------------------------------
AutoExec RunCode
MsgBox
AutoExec Actions
-------------------------------
RunCode
Function Name: TestTransfer()
MsgBox
Message: Database Is Open!
"C:\MSOffice\Access\MSAccess.exe" "C:\My Documents\Db2.mdb" /Runtime
For more information about TransferDatabase, search the Help Index for
"TransferDatabase."
For more information about CopyObject, search the Help Index for
"CopyObject."
Additional query words:
Keywords : kbprg kbdta AccCon IsmIea MdlOthr KbVBA
Version : WINDOWS:7.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: August 2, 1999