Attachment links (1 Viewer)

Alkhulaqui

New member
Local time
Tomorrow, 00:47
Joined
Mar 17, 2015
Messages
3
Hi

I am new to Access and I am trying to make a Database. However, I have an attachment with each record and I would like to know if there is a way of making a button/link that will allow the user to navigate from each record to its respective attachment.

And Thanks,
Mohamed
 

Eljefegeneo

Still trying to learn
Local time
Today, 14:47
Joined
Jan 10, 2011
Messages
904
I use this:

Code:
Application.FollowHyperlink Me.AttachedFile[\code]
 

Eljefegeneo

Still trying to learn
Local time
Today, 14:47
Joined
Jan 10, 2011
Messages
904
Sorry I meant to say that I use this code in the OnClick event of the control that has the attachment link.
 

Alkhulaqui

New member
Local time
Tomorrow, 00:47
Joined
Mar 17, 2015
Messages
3
Hi Eljefegeneo

As I indicated I am new to Access and I would be grateful if you would show me how to do it.
 

Eljefegeneo

Still trying to learn
Local time
Today, 14:47
Joined
Jan 10, 2011
Messages
904
I am assuming you have a field in which the attachment is listed. The way I do it is to list all attachments for a particular client, etc., in a subform. Then I can add the link to the attachment in the bound attachment text box on the subform, and put the above code in the click (or double click as I like to do) event for that text box.

If you are using the Access attachments (which are usually not recommended in this forum) then I think just by clicking on them brings them up.

I am not sure if you have only one attachment per record or many as I do. So I suggest that you try it first, just make a text box on a form, paste the link to the attachment in the text box with the above code in it, and then click on it. It should bring it up. Then you can see if this is what you want and make adjustments accordingly.
 

Eljefegeneo

Still trying to learn
Local time
Today, 14:47
Joined
Jan 10, 2011
Messages
904
You are most certainly welcome. I have been helped so many times on this forum that when I can actually answer a question, I do it. This forum is a great way to learn Access and especially VBA.
 

Users who are viewing this thread

Top Bottom