Using Hylperlink

habiler

Registered User.
Local time
Today, 19:33
Joined
Aug 10, 2014
Messages
70
Good Monday everybody.

I am blocked with the code which follows:

I would want that the hyperlink link is stored in the field and does not open. Is there a way to reach there. I tried with Gohyperlink but I failed.

I work in a form.

Thank you in advance

Yours

Habiler

Code:
Private Sub Décision_DblClick(Cancel As Integer)
Application.FollowHyperlink "P:\X\Y\Z\" & Me.Decision & ".pdf"
End Sub
 
try to evaluate the value of Me.Decision, is there an extension of .pdf? if that the case you have double extension there.
 
What version of acrobat is on the machine running the code? Acrobat DC doesn't seem to like application.followhyperlink

I had to fix this by using
Code:
Call Shell("CMD /C """ & Me.txtPath & """", 0)
 
Posts: 9
Joined: 6-August 15


spacer.gif

Hi,

Is it possible to store the value of the find file as a hyperlink in the form and the db simultanely?

If found Decision in c:\X\Y\Z\X.pdf then the value of c:\X\Y\Z\X.pdf is tored into the control Me.decision?

Thanks for all

Habiler

Hi
Decision is value with no extension.

If decision = 3478, by clicking on the control A access must retrieve P:\X\Y\Z\" & 3478".pdf and store it into control decision and the current db

Thanks

Habiler
 
store as in save in db the pdf file in the table, or just the string path paste to your textbox control?
 
you must add an attachment field in your table. on AfterUpdate of your form's event:

dim rsParent as Dao.RecordSet2
dim rsChild as Dao.RecordSet2

set rsParent = Me.RecordsetClone
rsParent.Edit

set rsChild= rsParent.Fields("yourAttachmentField").Value
rsChild.AddNew
rsChild.Fields("FileData").LoadFromFile "P:\X\Y\Z\" & Me.Decision & ".pdf"
rsChild.Update

rsParent.Update

set rsChild=nothing
set rsParent=nothing
 
recordset2 is same as recordset but can accomodate multivalue field, attachment., etc..
 

Users who are viewing this thread

Back
Top Bottom