Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    8

    Unanswered: cant fix run time error "2302"

    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

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    What is the exact error?
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by SoftwareMatters
    What is the exact error?
    " Microsoft Office Access can't save the output data to the file you've selected "

    since i posted i have run it numerous times with no success and then it just satrted to work? problem is no matter what i do i still cant get it to work on my colleague's computer and they are the people who use it everyday. I have copied over my report / database and replaced their old one but i am styill getting the error above

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •