A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlinks



 
 
Thread Tools Display Modes
  #1  
Old December 22nd, 2008, 06:56 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks

I'm not sure if I've understood this right or if I'm just doing something
wrong - maybe someone can help me?

I think it should be possible to have a field of the data type hyperlink and
to link to a document (PDF for example) on my hard drive and by clicking
that hyperlink to have the document open?

Well if that is the case it's not working for me and yet it seems like it
should be straightforward. I have a field of the correct data type in my
table. I have a data entry form and have clicked in the relevant filed and
have selected InsertHyperlink and have navigated to the file in question.
The file has an application associated with it - but it doesn't open.

Can anyone suggest what the problem might be? I'd be grateful for any help.



  #2  
Old December 22nd, 2008, 07:28 PM posted to microsoft.public.access.gettingstarted
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Hyperlinks

try this

http://www.mvps.org/access/api/api0018.htm


--
Wayne
Trentino, Italia.



"gavin" wrote:

I'm not sure if I've understood this right or if I'm just doing something
wrong - maybe someone can help me?

I think it should be possible to have a field of the data type hyperlink and
to link to a document (PDF for example) on my hard drive and by clicking
that hyperlink to have the document open?

Well if that is the case it's not working for me and yet it seems like it
should be straightforward. I have a field of the correct data type in my
table. I have a data entry form and have clicked in the relevant filed and
have selected InsertHyperlink and have navigated to the file in question.
The file has an application associated with it - but it doesn't open.

Can anyone suggest what the problem might be? I'd be grateful for any help.




  #3  
Old December 22nd, 2008, 07:36 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks


"Wayne-I-M" wrote in message
...
try this

http://www.mvps.org/access/api/api0018.htm


--
Wayne
Trentino, Italia.


Yikes! What do I do with that????


  #4  
Old December 22nd, 2008, 07:53 PM posted to microsoft.public.access.gettingstarted
Dale Fye
external usenet poster
 
Posts: 2,651
Default Hyperlinks

If you have a text field in a form, you should be able to copy the URL (or
path\file name) from your web browser or windows explorer, and paste that
value into the text field on your form. Then, when you click on that
textbox, it should navigate you to the URL or file.

Personally, I dislike the hyperlink datatype, and prefer to use text or memo
fields (for really long URLs). Then, I put a command button next to the
textbox on my forms and use the application.followhyperlink method in the
Click event of that button to follow the hyperlink to the URL or file.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



"gavin" wrote:

I'm not sure if I've understood this right or if I'm just doing something
wrong - maybe someone can help me?

I think it should be possible to have a field of the data type hyperlink and
to link to a document (PDF for example) on my hard drive and by clicking
that hyperlink to have the document open?

Well if that is the case it's not working for me and yet it seems like it
should be straightforward. I have a field of the correct data type in my
table. I have a data entry form and have clicked in the relevant filed and
have selected InsertHyperlink and have navigated to the file in question.
The file has an application associated with it - but it doesn't open.

Can anyone suggest what the problem might be? I'd be grateful for any help.




  #5  
Old December 22nd, 2008, 07:58 PM posted to microsoft.public.access.gettingstarted
Ron2006
external usenet poster
 
Posts: 936
Default Hyperlinks

1) you have NOT told us what is happening, if anything.

2) Another way is to have the field be simply a txt field and as long
as you can establish the entire path for the document name that you
place there you can have the dbl-click event issue the following

application.followhyperlink entirepathnameforfile


This usually makes it easier to input data since the user can simply
enter the actual file name AS LONG AS the rest of the path information
can be optained.

If this is a split split application or multi user application, having
something on YOUR hard drive will not work since the other users will
most like NOT be able to get to the file since C:\ will be
considered to be on THEIR hard drive.

Ron
  #6  
Old December 22nd, 2008, 08:07 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks


"Ron2006" wrote in message
...
1) you have NOT told us what is happening, if anything.

2) Another way is to have the field be simply a txt field and as long
as you can establish the entire path for the document name that you
place there you can have the dbl-click event issue the following

application.followhyperlink entirepathnameforfile


This usually makes it easier to input data since the user can simply
enter the actual file name AS LONG AS the rest of the path information
can be optained.

If this is a split split application or multi user application, having
something on YOUR hard drive will not work since the other users will
most like NOT be able to get to the file since C:\ will be
considered to be on THEIR hard drive.

Ron


Many thanks for that, Ron. Actually nothing was happening!

I shall try your work round tomorrow.

Your help is appreciated.


  #7  
Old December 22nd, 2008, 09:08 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks


"Dale Fye" wrote in message
...
If you have a text field in a form, you should be able to copy the URL (or
path\file name) from your web browser or windows explorer, and paste that
value into the text field on your form. Then, when you click on that
textbox, it should navigate you to the URL or file.

Personally, I dislike the hyperlink datatype, and prefer to use text or
memo
fields (for really long URLs). Then, I put a command button next to the
textbox on my forms and use the application.followhyperlink method in the
Click event of that button to follow the hyperlink to the URL or file.

--
HTH
Dale


Many thanks also to you, Dale. Hopefully I should be sorted now.


  #8  
Old December 23rd, 2008, 07:19 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks


"Dale Fye" wrote in message
...
If you have a text field in a form, you should be able to copy the URL (or
path\file name) from your web browser or windows explorer, and paste that
value into the text field on your form. Then, when you click on that
textbox, it should navigate you to the URL or file.

Personally, I dislike the hyperlink datatype, and prefer to use text or
memo
fields (for really long URLs). Then, I put a command button next to the
textbox on my forms and use the application.followhyperlink method in the
Click event of that button to follow the hyperlink to the URL or file.

--
HTH
Dale


I had a go at this today, Dale, but I have to admit that I'm pretty clueless
with VBA - and it didn't work! Either because my code was wrong - or for
another reason entirely.

My code is:

Private Sub Command52_Click()

Application.FollowHyperlink ("R:\..............\Thank you letter.pdf")

End Sub

The PDF is on a network (R:\) drive.

When I click the command button to fire this code it looks like something is
trying to happen because the screen kind of flickers - that's not describing
it too well - but I don't get an error message.

Is the code OK? What else could it be?


  #9  
Old December 24th, 2008, 03:42 AM posted to microsoft.public.access.gettingstarted
Dale Fye
external usenet poster
 
Posts: 2,651
Default Hyperlinks

gavin

Have you checked to see whether it opened in the background (behind Access)?
I just ran that code in the immediate window of A2007, and it flashed, then
showed me the access window again. When I did Alt-Tab, it showed me the
Word document I had opened, with it visible.

I'm not sure why it did not make word the active application. This is the
first time I've used that code in 2007, but it has worked great for me in
2003, in the past.

Dale

"gavin" wrote in message
m...

"Dale Fye" wrote in message
...
If you have a text field in a form, you should be able to copy the URL
(or
path\file name) from your web browser or windows explorer, and paste that
value into the text field on your form. Then, when you click on that
textbox, it should navigate you to the URL or file.

Personally, I dislike the hyperlink datatype, and prefer to use text or
memo
fields (for really long URLs). Then, I put a command button next to the
textbox on my forms and use the application.followhyperlink method in the
Click event of that button to follow the hyperlink to the URL or file.

--
HTH
Dale


I had a go at this today, Dale, but I have to admit that I'm pretty
clueless with VBA - and it didn't work! Either because my code was wrong -
or for another reason entirely.

My code is:

Private Sub Command52_Click()

Application.FollowHyperlink ("R:\..............\Thank you letter.pdf")

End Sub

The PDF is on a network (R:\) drive.

When I click the command button to fire this code it looks like something
is trying to happen because the screen kind of flickers - that's not
describing it too well - but I don't get an error message.

Is the code OK? What else could it be?



  #10  
Old December 24th, 2008, 05:42 PM posted to microsoft.public.access.gettingstarted
gavin
external usenet poster
 
Posts: 33
Default Hyperlinks


"Dale Fye" wrote in message
...
gavin

Have you checked to see whether it opened in the background (behind
Access)? I just ran that code in the immediate window of A2007, and it
flashed, then showed me the access window again. When I did Alt-Tab, it
showed me the Word document I had opened, with it visible.

I'm not sure why it did not make word the active application. This is the
first time I've used that code in 2007, but it has worked great for me in
2003, in the past.

Dale


Hi Dale,
That was exactly what was happening for me - the screen just flashed but
Access was still the active Window - and the target document did not appear
on the task bar. However, having tried this again and doing what you
suggest, i.e. Alt-Tab, I find that the application is indeed open! Slightly
odd behaviour - a minor bug? - but at least it's working!

Thanks for persevering with me, Dale - it's much appreciated!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.