Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to store a Access report to a local C: drive that works for different computers

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
I have an Access Db on a server (a storage server not an application server). There are multiple users using the Db from time to time. In my Db I need to export reports in PDF to their C: drives - to a selected folder. If I code the export to save a file to "C:\Special" folder, as an example, will that work on all their computers, assuming they have a folder named Special? If not, how can I make it happen?

Thanks,

John
 
You can always make a directory like:

Code:
Public Function MakeAFolder(strFolder As String)
    
    On Error GoTo ErrHandler
    MkDir strFolder
    Exit Function
ErrHandler:
    Select Case Err.Number
        Case 75
            'already exists so ignore
        Case Else
            MsgBox "Err: " & Err.Description
    End Select
End Function

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top