Link to home
Start Free TrialLog in
Avatar of tomfulton
tomfultonFlag for United States of America

asked on

How do I open an external file from a button on an Access edit form.?

I have a simple on line web form that collects data and sends it into an Access Database held in a folder called "HR".  It also uploads a users resume, which is uploaded to a file folder called "Uploads" located in "HR".  I have created a snippet of code that works great if I run it from an access db on the server:

Option Compare Database
Private Sub Command50_Click()
FollowHyperlink "uploads/" & Me.filename
Exit_Command51_Click:
    Exit Sub
Err_Command51_Click:
    MsgBox Err.Description
    Resume Exit_Command51_Click
End Sub

HOWEVER, when I try to replicate this function with a local version of the access database (with linked tables) on my desktop, updating the path, I get an error message that reads: Cannot locate the internet server or proxy server.  I have permissions set.  

Here is the code I am using to try and grab the resume from my local (desktop) version.
Private Sub Command148_Click()
FollowHyperlink "y:/hr/uploads/" & Me.filename
Exit_Command51_Click:
    Exit Sub
Err_Command51_Click:
    MsgBox Err.description
    Resume Exit_Command51_Click
End Sub

NOTE:  "Y" is my mapped drive letter to the server.

Any help will be GREATL APPRECIATED
ASKER CERTIFIED SOLUTION
Avatar of omgang
omgang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial