M
MJ
I am having problems trying to export table data. My first desire was to
export three data tables to an "archive" database. Perhaps someone out there
can help me with my situation.
As said above I wanted to export these tables completely for record
purposes. I attempted to use two methods: TransferDatabase and CopyObject.
Below are examples of the code:
1) DoCmd.TransferDatabase acExport, , _
"H:\Data\M (M Ctr)\ProdRep\OptEdit Error Reporting Project\" & _
"OptEditError Archive.mdb", acTable, _
"Table: OptEdit Errors, NEW", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].[CW], "yyyy mm dd")
2) DoCmd.CopyObject "H:\Data\M (M Ctr)\ProdRep\OptEdit Error " & _
"Reporting Project\OptEditError Archive.mdb", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd"), , _
"Table: OptEdit Errors, NEW"
In each case, I get the following error... "<Database name> can't find the
field '|' referred to in your expression." I may be missing something, but
no where in this code are there any '|'s. I have even tried simplfying the
names and still get the same error message box.
As a result of these continued errors, I altered my plans and decided to try
exporting to spreadsheets into an archive directory instead. My first try
was simply to export the table into xls, then I tried creating a simple
select query to export to xls using the following methods:
3) DoCmd.TransferSpreadsheet acExport, 8, _
"Table: OptEdit Errors, NEW", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd") & ".xls", True, ""
4) DoCmd.TransferSpreadsheet acExport, 8, _
"Qry-Weekly Rpt: OptEdit Errors, NEW", _
"OptEdit Errors NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd") & ".xls", True, ""
Unfortunately, I have gotten the same error results.
Hopefully one of you out there will be able to help me out of my predicament.
Thanks in advance for your help
export three data tables to an "archive" database. Perhaps someone out there
can help me with my situation.
As said above I wanted to export these tables completely for record
purposes. I attempted to use two methods: TransferDatabase and CopyObject.
Below are examples of the code:
1) DoCmd.TransferDatabase acExport, , _
"H:\Data\M (M Ctr)\ProdRep\OptEdit Error Reporting Project\" & _
"OptEditError Archive.mdb", acTable, _
"Table: OptEdit Errors, NEW", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].[CW], "yyyy mm dd")
2) DoCmd.CopyObject "H:\Data\M (M Ctr)\ProdRep\OptEdit Error " & _
"Reporting Project\OptEditError Archive.mdb", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd"), , _
"Table: OptEdit Errors, NEW"
In each case, I get the following error... "<Database name> can't find the
field '|' referred to in your expression." I may be missing something, but
no where in this code are there any '|'s. I have even tried simplfying the
names and still get the same error message box.
As a result of these continued errors, I altered my plans and decided to try
exporting to spreadsheets into an archive directory instead. My first try
was simply to export the table into xls, then I tried creating a simple
select query to export to xls using the following methods:
3) DoCmd.TransferSpreadsheet acExport, 8, _
"Table: OptEdit Errors, NEW", _
"Table: OptEdit Errors, NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd") & ".xls", True, ""
4) DoCmd.TransferSpreadsheet acExport, 8, _
"Qry-Weekly Rpt: OptEdit Errors, NEW", _
"OptEdit Errors NEW " & _
Format([Table LU: DateSat].CW, "yyyy mm dd") & ".xls", True, ""
Unfortunately, I have gotten the same error results.
Hopefully one of you out there will be able to help me out of my predicament.
Thanks in advance for your help