Hyperlink or Attachment (1 Viewer)

Wayne

Crazy Canuck
Local time
Today, 06:34
Joined
Nov 4, 2012
Messages
176
I read a reply to a thread by Doc Man about this. I set up a subform to enter the file path for stored documents relating to a job on the main form (as opposed to an attachments field). Should the field be set up as a hyperlink, and what code would you use to open the file to view it? The files are pdf documents. Any help would be appreciated.

The thread was:

https://access-programmers.co.uk/forums/showthread.php?t=292777&highlight=attachments
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:34
Joined
May 7, 2009
Messages
19,226
if he field is hyperlink, no code needed to navigate to the link.
if plain text, you use:


FollowHyperLink [fieldname]


it would be better to use it on DoubleClick Event of the control.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:34
Joined
Feb 19, 2002
Messages
43,196
The Hyperlink datatype is valid for ACE (.accdb) but it is not upsizable to SQL Server so the FollowHyperlink method suggested by arnelgp is preferable.
 

Wayne

Crazy Canuck
Local time
Today, 06:34
Joined
Nov 4, 2012
Messages
176
Any thoughts on the best place to put that code to follow the hyperlink?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:34
Joined
Feb 19, 2002
Messages
43,196
arnelgp already suggested the double click event of the control
 

Users who are viewing this thread

Top Bottom