Creating Hyperlink Field

denileigh

Registered User.
Local time
Today, 05:33
Joined
Dec 9, 2003
Messages
212
Hi all!

I have an access front end database with an SQL backend that resides on the server.

I need to add a field to the Employee table that links to a folder for each employee on the server that contains their training docs (word and pdf).

I created a text field but don't know how to get it to open from the employee record form. The link is there but I need to be able to click to open.

It would also be able to click to open explorer to point to the file in the first place.

Can anyone help? Thanks so much!
 
Sorry, it is a short holiday week so I won't have time to test this.
SQL Server can only store text. But, the text can inlcude any HTML tags around it. The hyper link can be retrieved to use in the application.

There are a couple of approachs.
If you actually want to open a Word or PDF, then look for the Shell command examples. Knowing the type of file being opened is required.

If opening the directory folder where the file exist so the user can finish the task, then this should work:

Dim filePath = <"Insert the path of the directory to open inside of opening and closing parenthesis">

Code:
Dim filePath as String
filePath = DLookup("DocLocation", "dbLocations", "[Description] = 'Royal Wedding Crasher Plan'")
Application.FollowHyperlink filePath, vbNormalFocus    
'This allows navigation to a specific directory.



Application.FollowHyperlink filePath, vbNormalFocus
 
Thank you but I'm still a bit confused as to where to put that. Can't seem to figure it out. What would it look like for this path?

Z:\Company\Quality Assurance\HCCPT Quality Assurance Program\AAR Documents\CFR 49, Responsibilities of Tank Car Facility, Section 180.513(b)
 

Users who are viewing this thread

Back
Top Bottom