Hi All,
Just to explain, I know very little about access at all and the guy who built this report is on longterm sick leave.
My manager always gives me stuff like this to fix and i can normally work it out but not this time. I have manually exported the queries needed for today but I cant fix the below output error and this is run everyday by another team.
When the report is finished it normally outputs four excel files but instead is giving me the error in the title, when i go into debug it had the output code at the end highlighted. Can this be fixed?
Private Sub import_data_DblClick(Cancel As Integer)
MyVar = MsgBox("Data Import Started", vbOKOnly, "IMPORT MESSAGE")
DoCmd.TransferText acImportDelim, "Interactions Import Specification", "Interactions", "d:\Automated MS Access\Collections\Interactions.txt", 0
DoCmd.DeleteObject acTable, "POLREM"
DoCmd.TransferText acImportDelim, "POLREM Import Specification", "POLREM", "d:\Automated MS Access\Collections\POLREM.txt", 0
MyVar = MsgBox("Data Imported", vbOKOnly, "IMPORT MESSAGE")
MyVar = MsgBox("Queries are about to run, enter data where prompted. DO NOT PRESS CANCEL", vbOKOnly, "QUERY MESSAGE")
DoCmd.SetWarnings False
DoCmd.OpenQuery "POLREM for Bill Date"
DoCmd.Close acQuery, "POLREM for Bill Date", acSaveYes
DoCmd.OpenQuery "POLREM for Bill Date Exceptions"
DoCmd.Close acQuery, "POLREM for Bill Date Exceptions", acSaveYes
DoCmd.OpenQuery "Business Type Exceptions"
DoCmd.Close acQuery, "Business Type Exceptions", acSaveYes
DoCmd.OpenQuery "Business Type Exceptions Review"
DoCmd.Close acQuery, "Business Type Exceptions Review", acSaveYes
DoCmd.OpenQuery "Auto Remind query before Clarify match"
DoCmd.Close acQuery, "Auto Remind query before Clarify match", acSaveYes
DoCmd.OpenQuery "Auto Remind query NOT NONE"
DoCmd.Close acQuery, "Auto Remind query NOT NONE", acSaveYes
DoCmd.OpenQuery "Auto Remind query NULL"
DoCmd.Close acQuery, "Auto Remind query NULL", acSaveYes
DoCmd.OpenQuery "Auto Remind Clarify Review"
DoCmd.Close acQuery, "Auto Remind Clarify Review", acSaveYes
DoCmd.OpenQuery "Auto Remind query Without Matching Interactions"
DoCmd.Close acQuery, "Auto Remind query Without Matching Interactions", acSaveYes
DoCmd.OpenQuery "CORPU"
DoCmd.Close acQuery, "CORPU", acSaveYes
DoCmd.SetWarnings True
MyVar = MsgBox("Files are now ready to export", vbOKOnly, "EXPORT MESSAGE")
DoCmd.OutputTo acOutputQuery, "Business Type Exceptions Review", acFormatXLS, "LIQ and OSP Review.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query NOT NONE", acFormatXLS, "Pay Plan exceptions.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query NULL", acFormatXLS, "Pay Plan is empty.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind Clarify Review", acFormatXLS, "Reviews.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query Without Matching Interactions", acFormatXLS, "Autoremind.xls", True
DoCmd.OutputTo acOutputQuery, "CORPU", acFormatXLS, "CORPU.xls", True
MyVar = MsgBox("Program Finished", vbOKOnly, "END MESSAGE")
End Sub
Many thanks
Just to explain, I know very little about access at all and the guy who built this report is on longterm sick leave.
My manager always gives me stuff like this to fix and i can normally work it out but not this time. I have manually exported the queries needed for today but I cant fix the below output error and this is run everyday by another team.
When the report is finished it normally outputs four excel files but instead is giving me the error in the title, when i go into debug it had the output code at the end highlighted. Can this be fixed?
Private Sub import_data_DblClick(Cancel As Integer)
MyVar = MsgBox("Data Import Started", vbOKOnly, "IMPORT MESSAGE")
DoCmd.TransferText acImportDelim, "Interactions Import Specification", "Interactions", "d:\Automated MS Access\Collections\Interactions.txt", 0
DoCmd.DeleteObject acTable, "POLREM"
DoCmd.TransferText acImportDelim, "POLREM Import Specification", "POLREM", "d:\Automated MS Access\Collections\POLREM.txt", 0
MyVar = MsgBox("Data Imported", vbOKOnly, "IMPORT MESSAGE")
MyVar = MsgBox("Queries are about to run, enter data where prompted. DO NOT PRESS CANCEL", vbOKOnly, "QUERY MESSAGE")
DoCmd.SetWarnings False
DoCmd.OpenQuery "POLREM for Bill Date"
DoCmd.Close acQuery, "POLREM for Bill Date", acSaveYes
DoCmd.OpenQuery "POLREM for Bill Date Exceptions"
DoCmd.Close acQuery, "POLREM for Bill Date Exceptions", acSaveYes
DoCmd.OpenQuery "Business Type Exceptions"
DoCmd.Close acQuery, "Business Type Exceptions", acSaveYes
DoCmd.OpenQuery "Business Type Exceptions Review"
DoCmd.Close acQuery, "Business Type Exceptions Review", acSaveYes
DoCmd.OpenQuery "Auto Remind query before Clarify match"
DoCmd.Close acQuery, "Auto Remind query before Clarify match", acSaveYes
DoCmd.OpenQuery "Auto Remind query NOT NONE"
DoCmd.Close acQuery, "Auto Remind query NOT NONE", acSaveYes
DoCmd.OpenQuery "Auto Remind query NULL"
DoCmd.Close acQuery, "Auto Remind query NULL", acSaveYes
DoCmd.OpenQuery "Auto Remind Clarify Review"
DoCmd.Close acQuery, "Auto Remind Clarify Review", acSaveYes
DoCmd.OpenQuery "Auto Remind query Without Matching Interactions"
DoCmd.Close acQuery, "Auto Remind query Without Matching Interactions", acSaveYes
DoCmd.OpenQuery "CORPU"
DoCmd.Close acQuery, "CORPU", acSaveYes
DoCmd.SetWarnings True
MyVar = MsgBox("Files are now ready to export", vbOKOnly, "EXPORT MESSAGE")
DoCmd.OutputTo acOutputQuery, "Business Type Exceptions Review", acFormatXLS, "LIQ and OSP Review.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query NOT NONE", acFormatXLS, "Pay Plan exceptions.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query NULL", acFormatXLS, "Pay Plan is empty.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind Clarify Review", acFormatXLS, "Reviews.xls", True
DoCmd.OutputTo acOutputQuery, "Auto Remind query Without Matching Interactions", acFormatXLS, "Autoremind.xls", True
DoCmd.OutputTo acOutputQuery, "CORPU", acFormatXLS, "CORPU.xls", True
MyVar = MsgBox("Program Finished", vbOKOnly, "END MESSAGE")
End Sub
Many thanks