Using DoCmd.OutPutto to a PDF on a shared drive (1 Viewer)

vhanus2

Registered User.
Local time
Yesterday, 23:53
Joined
Aug 13, 2018
Messages
10
Hello,

I have an access databases where am saving a pdf of the report in a shared folder; however, it looks as though the most recent person to have saved the actual DB to the shared person is the one whos PDF's go to the DB, other wise it goes to your documents folder in your computer.

Does any one have a way around this?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:53
Joined
Oct 29, 2018
Messages
21,358
Hi,

Are using code to do this? If so, please show us the code. If not, please describe how you generate the PDF.
 

vhanus2

Registered User.
Local time
Yesterday, 23:53
Joined
Aug 13, 2018
Messages
10
Yes of course, here's the code:
Code:
Private Sub Command325_Click()
On Error GoTo Command325_Click_Err
    DoCmd.OpenReport "RPtCB", acViewReport, "", "[PO#]=" & [PO#], acNormal
    DoCmd.OutputTo acOutputReport, "RPtCB", "PDFFormat(*.pdf)", Me.PO_ & "-Price", False, "F:\ACCT\COSTING\Chargebacks\Pricing", 0, acExportQualityPrint
    DoCmd.Close acReport, "RPtCB"
    
Command325_Click_Exit:
    Exit Sub
Command325_Click_Err:
    MsgBox Error$
    Resume Command325_Click_Exit
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:53
Joined
Oct 29, 2018
Messages
21,358
Hi,

Thanks. Is your database properly split? If so, the only other thing I am wondering is what happens if two people happen to save the same PDF? Do they get an error or does a duplicate show up in the shared drive or maybe it gets saved in the Documents folder?
 

vhanus2

Registered User.
Local time
Yesterday, 23:53
Joined
Aug 13, 2018
Messages
10
I dont have the DB split, and with the way the db is going to be used it will be rare that someone will be saving the same PDF but i did try earlier and i received an error saying the document already existed.
 

Users who are viewing this thread

Top Bottom