Bound hyperlink in forms

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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.
 
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]
 
Back
Top