C
Chase
In the code below I had to stipulate the full UNC for "DoCmd.CopyObject" How
do I set this up to work anywhere.
Code
Dim StrBDM As String
Dim StrPath As String
StrBDM = ("qctb" & Forms![frmReportOps]![cboBDM])
StrPath = "\\admiral-srv1\data\VolumeDatabase\Reports\" & txtFileName &
".xls"
DoCmd.SetWarnings False
Me.Form.Requery
DoCmd.CopyObject "\\admiral-srv1\data\VolumeDatabase\ProcessReport.mdb",
StrBDM, acQuery, "qctbReport"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, StrBDM,
StrPath, True
DoCmd.DeleteObject acQuery, StrBDM
DoCmd.SetWarnings True
do I set this up to work anywhere.
Code
Dim StrBDM As String
Dim StrPath As String
StrBDM = ("qctb" & Forms![frmReportOps]![cboBDM])
StrPath = "\\admiral-srv1\data\VolumeDatabase\Reports\" & txtFileName &
".xls"
DoCmd.SetWarnings False
Me.Form.Requery
DoCmd.CopyObject "\\admiral-srv1\data\VolumeDatabase\ProcessReport.mdb",
StrBDM, acQuery, "qctbReport"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, StrBDM,
StrPath, True
DoCmd.DeleteObject acQuery, StrBDM
DoCmd.SetWarnings True