View File from location (1 Viewer)

Jonny45wakey

Member
Local time
Today, 17:36
Joined
May 4, 2020
Messages
40
Hi I have a ListBox on a Form which contains a list of entries in my database, one of the fields in the list is the location of an attached document

Is there any way on the double click event for each particular row in the listbox to view / display the file stored in the location, eg a PDF?

Column 7 in the image below is the location of the PDF

Screenshot 2020-11-25 160244.jpg



Thanks Jonny
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:36
Joined
Oct 29, 2018
Messages
21,358
Hi. You could try something like.

Application.FollowHyperlink Me.ListboxName.Column(6)
 

Isaac

Lifelong Learner
Local time
Today, 10:36
Joined
Mar 14, 2017
Messages
8,738
I would suggest making a copy of the file in your user's TEMP folder, then opening the copy.

Unless you want to open yourself up to things like: End users editing the original, End users not being able to open/conflicts, etc.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:36
Joined
May 7, 2009
Messages
19,169
add code (Code Builder) to the listbox (On Dbl Click) Event:


Code:
private sub listboxName_DblClick(Cancel As Integer)
FollowHyperLink "" & Me!listboxName.Column(6) & ""
end sub
 

Users who are viewing this thread

Top Bottom