'Error using DoCmd.TransferDataBase in PowerShell - 'The Table cannot be exported'
I'm trying to export a MS Access table from a .accdb file for distribution and upload to tables on other db files across a network.
My method call looks like this:
$appPath = C:\Users\Me\Desktop\SourceAccessFile.accdb"
$reportpath = "C:\Users\Me\Desktop\DesiredFileName.mdb"
$Access.DoCmd.TransferDatabase([acDataTransferType]::acExport, "Microsoft Access", $appPath, [acObjectType]::acTable, "TPnPDispatchedExport-WC", $reportPath)
With the following $Error value:
'' cannot be imported, exported, or copied to Access database files.
I can't see what's wrong with either of my paths, both echoed and checked. The format of my arguments seems fine but I'm clearly missing something. Does anyone with fresh eyes see what I might be doing wrong here? Glad to share more if it can be useful.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
