hyperlink in form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a Hyperlink field in a form that opens documents in a
certain
folder
j:\werners\hr_secured\resumes
and allows her to type in the name of the document in the form to complete
the link. If the document was named "test.pdf", I'd like for her to be able
to type in "test.doc" in the field and have it link to
j:\werners\hr_secured\resumes\test.pdf when she clicks on it. Help would be
greatly appreciated!!!!!!!
 
Use a mapped drive letter with caution, as it may change, then your app
breaks.

Use UNC: \\servername\folder\filename.ext

A hyperlink is just a Label control, with the Hyperlink Address set to a
value. So, using some event, like the Form's OnCurrent, you can update the
label to display whatever you need.
 
Even with the unc I am having problems, can you send me an example of how you
set it up. Right now I am using
Dim DocLocationAndName as String
DocLocationAndName = "\\optimus\FDA_team\werners\hr_secured\resumes\" &
Me.[TextFieldName]
application.FollowHyperlink DocLocationAndName

I got it working on one form, but when I tried it on the next form it
wouldn't work.
 
It appears to me that you didn't use any of the properties that I mentioned
previously, rather solved it with a different method.

I typically use the Shell function to open documents, so I'm not familiar
with the Application.FollowHyperlink method. But, if you got it to work
once, then you know it works, and you just need to replicate.

--
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

Aaron Daniels said:
Even with the unc I am having problems, can you send me an example of how
you
set it up. Right now I am using
Dim DocLocationAndName as String
DocLocationAndName = "\\optimus\FDA_team\werners\hr_secured\resumes\" &
Me.[TextFieldName]
application.FollowHyperlink DocLocationAndName

I got it working on one form, but when I tried it on the next form it
wouldn't work.

[MVP] S.Clark said:
Use a mapped drive letter with caution, as it may change, then your app
breaks.

Use UNC: \\servername\folder\filename.ext

A hyperlink is just a Label control, with the Hyperlink Address set to a
value. So, using some event, like the Form's OnCurrent, you can update
the
label to display whatever you need.
 
Obviously my way isn't working so I'm open to your way. Can you give me an
example of how to do it using the shell function?

[MVP] S.Clark said:
It appears to me that you didn't use any of the properties that I mentioned
previously, rather solved it with a different method.

I typically use the Shell function to open documents, so I'm not familiar
with the Application.FollowHyperlink method. But, if you got it to work
once, then you know it works, and you just need to replicate.

--
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

Aaron Daniels said:
Even with the unc I am having problems, can you send me an example of how
you
set it up. Right now I am using
Dim DocLocationAndName as String
DocLocationAndName = "\\optimus\FDA_team\werners\hr_secured\resumes\" &
Me.[TextFieldName]
application.FollowHyperlink DocLocationAndName

I got it working on one form, but when I tried it on the next form it
wouldn't work.

[MVP] S.Clark said:
Use a mapped drive letter with caution, as it may change, then your app
breaks.

Use UNC: \\servername\folder\filename.ext

A hyperlink is just a Label control, with the Hyperlink Address set to a
value. So, using some event, like the Form's OnCurrent, you can update
the
label to display whatever you need.

--
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

I am trying to create a Hyperlink field in a form that opens documents
in a
certain
folder
j:\werners\hr_secured\resumes
and allows her to type in the name of the document in the form to
complete
the link. If the document was named "test.pdf", I'd like for her to be
able
to type in "test.doc" in the field and have it link to
j:\werners\hr_secured\resumes\test.pdf when she clicks on it. Help
would
be
greatly appreciated!!!!!!!
 

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

Back
Top