Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2002
    Posts
    7

    Unanswered: Run-time error 2302

    I am getting run-time error 2302 "can't save the output data to the file you've selected." I am outputting an Access 97 report to an .rtf format on our shared drive. This report is created every day usually with no problem, but once in awhile this error occurs and the procedure bombs. How can I determine why it is happening or how to error trap for it so I can skip this step and continue on with the next step? Thank you.

  2. #2
    Join Date
    Jan 2003
    Location
    Rockville, MD
    Posts
    179
    Perhaps the disk is full?
    Or the file name contains one of following invalid characters !@#$%^&*():;?
    Or the folder got deleted?

    You can trap the error like this
    Code:
    Sub BonniesProcedure()
       On Error Goto BonniesProcedure_Err
       DoCmd.OutputTo acOutputReport, "Bonnies Report", acFormatRTF, "Z:\Shared Folder", True
       On Error Goto 0
    Exit Sub
    BonniesProcedure_Err:
       If Err = 2302 Then
          'insert code you want to execute when that error occurs
       End If
       Resume Next
    End Sub
    Or you can just proceed to the next step like this
    Code:
    Sub BonniesProcedure()
       On Error Resume Next
       DoCmd.OutputTo acOutputReport, "Bonnies Report", acFormatRTF, "Z:\Shared Folder", True
       On Error Goto 0
    Exit Sub

  3. #3
    Join Date
    Jul 2002
    Posts
    7
    The filename does not contain invalid characters. The folder has not been deleted. The disk is not full.

    But I am going to try your error routine FOR SURE. When this does happen I need them to skip this step and go to the next. Thanks so much for your help, your code and your quick response!

  4. #4
    Join Date
    Jan 2003
    Posts
    15
    Sounds like a file open problem, or session limit to me... just my two cents you'll know when you trap the error

Posting Permissions

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