Hi.
I am using Access 2013 and using DoCmd.TransferSpreadsheet acOutputQuery to output a query of a table to an excel template that has all the columns formatted and I call a routine that I use for many different reports. Each report has it own template but they all use the same export procedure (screen shot attached of code). But for just a few the data format is lost after the export.
Below is the code for 1 of the reports that calls the routine:
Sub GTINs_Already_Synched_Submitted_on_VQT()
DoCmd.SetWarnings False
template_file = "\\msfs05.lowes.com\data1\share\MDCM_Reports\Product_Information\PI Item Setup Tracker\Templates\GTINs Already Synched Submitted on VQT.xlsm" '
report_file = "C:\PI_Edgenet_Reports\GTINs Already Synched Submitted on VQT.xlsm"
sheet_name = "GTINs Already Synched Submitte"
FileCopy template_file, report_file
DoCmd.TransferSpreadsheet acOutputQuery, 10, "qry_tbl_Vendor_Quote_Template_Synched_History", report_file, False, "Data1"
Export_Report_For_All
End Sub
Thanks for any assistance!
CF
I am using Access 2013 and using DoCmd.TransferSpreadsheet acOutputQuery to output a query of a table to an excel template that has all the columns formatted and I call a routine that I use for many different reports. Each report has it own template but they all use the same export procedure (screen shot attached of code). But for just a few the data format is lost after the export.
Below is the code for 1 of the reports that calls the routine:
Sub GTINs_Already_Synched_Submitted_on_VQT()
DoCmd.SetWarnings False
template_file = "\\msfs05.lowes.com\data1\share\MDCM_Reports\Product_Information\PI Item Setup Tracker\Templates\GTINs Already Synched Submitted on VQT.xlsm" '
report_file = "C:\PI_Edgenet_Reports\GTINs Already Synched Submitted on VQT.xlsm"
sheet_name = "GTINs Already Synched Submitte"
FileCopy template_file, report_file
DoCmd.TransferSpreadsheet acOutputQuery, 10, "qry_tbl_Vendor_Quote_Template_Synched_History", report_file, False, "Data1"
Export_Report_For_All
End Sub
Thanks for any assistance!
CF