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