View File from location

Jonny45wakey

Member
Local time
Today, 01:03
Joined
May 4, 2020
Messages
48
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
 
Hi. You could try something like.

Application.FollowHyperlink Me.ListboxName.Column(6)
 
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.
 
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

Back
Top Bottom