Results 1 to 4 of 4
  1. #1
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77

    Error 75 on PDF creation for only 1 user

    Error 75 occured. Path/File access error

    I have to assume it has to have something to do with their local machine. the have Microsoft to PDF and FoxitPhantomPDF Printer. works for everyone else. they have runtime accde file. was thinking of putting Full Access on it and stepping through. file is saved to a OneDrive folder. UservenuePath is stored in a 'Linked' table.



    Code:
    DoCmd.RunCommand acCmdSaveRecord
    
    Dim UserVenuePath As String
    Dim strFilePath As String
    Dim strReport As String
    
    
    UserVenuePath = DLookup("[FilePath]", "tbl_SystemInfo", "[SystemInfoID] = 1")
    strFilePath = UserVenuePath & "\Contracts\" & Format(Form_frm_Contract.DateofFunction, "MM-DD-yyyy") & "\" & Form_frm_Contract.DayTimeFunction & "\"
    strFileName = Form_frm_Contract.NameonContract & ".pdf"
    
    
    If FolderExists(strFilePath) = False Then
              Call MakeDir(strFilePath)
    Else
              MsgBox "This folder already exists.", vbInformation, "Folder Exists"
    End If
    
    
    'First let's open the report
    strReport = "rpt_Contract"
    DoCmd.OpenReport strReport, acViewPreview, , "[ContractsID] = [Forms]![frm_Contract]![ContractsID]", acWindowNormal
    
    
    'Now let's save the open report to .PDF
    DoCmd.SelectObject acReport, strReport
    DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strFilePath & strFileName, False, , , acExportQualityPrint
    DoCmd.Close acReport, strReport
    
    
    'Display Message
    MsgBox "New file has created successfully in the new folder!", vbInformation, "VBAF1"
    Thoughts

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Are they able to save anything in that location?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    Yes, including creating a pdf manually

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Error has a lot of causes, none of which I can think of that apply to one user other than user permissions, and you seem to have eliminated that. Code should not run at all if it was a Trusted Locations issue, so likely not that either.

    Suggest you step through the code and check variable values - even add Debug.Print to the code to see the path strings in the immediate window. One user may be doing something odd or a piece of the path isn't valid just for the one user.
    Last edited by Micron; 04-07-2022 at 11:28 AM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Run-time error 2501 for one user on one PC
    By TheBradish in forum Access
    Replies: 11
    Last Post: 06-13-2017, 04:02 AM
  2. Multiple User Error
    By Ddempsii in forum Access
    Replies: 4
    Last Post: 09-29-2015, 09:11 AM
  3. User access form creation
    By Rye in forum Forms
    Replies: 3
    Last Post: 09-28-2015, 07:53 AM
  4. User-Defined Type Error?
    By excellenthelp in forum Programming
    Replies: 11
    Last Post: 06-25-2014, 07:13 AM
  5. Replies: 8
    Last Post: 07-18-2013, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums