Bound hyperlink in forms

G

Guest

I have a personnel data form and want to add a hyperlink to open a PDF doc
bound to each record. The underlying query for the form builds the PDF file
name according to the file-naming protocol established. The file name
correctly displays in form view. But, upon clicking, nothing happens. Any
clues what I'm doing wrong?
 
K

kingston via AccessMonster.com

The query is passing the string to the form but it can't tell the form that
the string is a hyperlink. Simply use the control's OnClick event:

Application.FollowHyperlink Me.ControlName
 
G

Guest

Thanks for responding. I've experimented with your suggestion without
success. I'm unfamiliar with coding and clearly beyond my pay grade. I beg
your patience to instruct me further. What is "Me.ControlName"? Thanks in
advance.
 
K

kingston via AccessMonster.com

Me. is just a reference to the form object. The only part of the code you
need to provide is ControlName. Go into design mode of the form and click on
the text box where the hyperlink is. Open the properties of the text box
control and find its name. This is the name that is used to reference the
control object (in this case, it's contents). While still in the control's
properties window, go to the control's On Click event. Select [Event
Procedure], click the "..." button, and type the line of code I provided in
the procedure that Access creates.
Thanks for responding. I've experimented with your suggestion without
success. I'm unfamiliar with coding and clearly beyond my pay grade. I beg
your patience to instruct me further. What is "Me.ControlName"? Thanks in
advance.
The query is passing the string to the form but it can't tell the form that
the string is a hyperlink. Simply use the control's OnClick event:
[quoted text clipped - 6 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top