HYPERLINK

V

Vic

I've setup a field in one of my tables as a hyperlink and placed the field in
the form.

We are currently scanning documents to PDF file and then we attach those
files to lets say a client. However in order to do this we have to go to the
insert option on the menu bar and then select hyperlink. Then this takes us
to the database directory and from there we choice the directory that the pdf
file is in. Lastly we select the file and we're done.

Here's the thing though. I would like to be able to setup on the field in
the form a i.e. on double click that it those everything stated above and
then all we have to do is select the file we want.

Can anyone help with this. I've searched through the help menu but it
really doesn't reference doing anything like this. I know I need to go to
the event tab and pick on double click and select code builder. I don't know
anything about how to write that code.

Thx
 
A

Allen Browne

Add these 2 lines to the Event Procedure code for the button's Click event:

Me.[PutYourHyperlinkFieldTextBoxNameHere].SetFocus
RunCommand acCmdInsertHyperlink
 
V

Vic

Awesome. That was exactly what I was looking for. Thx.

Get a bit of another problem though. When you click on the hyperlink now I
get this message. Hyperlink can be harmful to your computer and data. To
protect your computer, click on those hyperlinks from trusted sources. Do
you want to continue.

I've looked at the database and trusted sources but how do you add it or
prevent this message ;(.

Thx.

First part was awesome them. Still excited about it. I know little things
make me happy. Merry Christmas everyone and to you and yours Allen
especially.

Allen Browne said:
Add these 2 lines to the Event Procedure code for the button's Click event:

Me.[PutYourHyperlinkFieldTextBoxNameHere].SetFocus
RunCommand acCmdInsertHyperlink

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Vic said:
I've setup a field in one of my tables as a hyperlink and placed the field
in
the form.

We are currently scanning documents to PDF file and then we attach those
files to lets say a client. However in order to do this we have to go to
the
insert option on the menu bar and then select hyperlink. Then this takes
us
to the database directory and from there we choice the directory that the
pdf
file is in. Lastly we select the file and we're done.

Here's the thing though. I would like to be able to setup on the field in
the form a i.e. on double click that it those everything stated above and
then all we have to do is select the file we want.

Can anyone help with this. I've searched through the help menu but it
really doesn't reference doing anything like this. I know I need to go to
the event tab and pick on double click and select code builder. I don't
know
anything about how to write that code.

Thx
 
A

Allen Browne

There are several possible issues here. Some depend on policies that you may
not have permission to alter (depending on who manages your computer.)

If you are opening a file, such as:
C:\SomeFolder\SomFile.pdf
it might make a difference if you form the complete hyperlink, including
prepending the file:/// prefix.

Details in:
Hyperlinks: warnings, special characters, errors
at:
http://allenbrowne.com/func-GoHyperlink.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Vic said:
Awesome. That was exactly what I was looking for. Thx.

Get a bit of another problem though. When you click on the hyperlink now
I
get this message. Hyperlink can be harmful to your computer and data. To
protect your computer, click on those hyperlinks from trusted sources. Do
you want to continue.

I've looked at the database and trusted sources but how do you add it or
prevent this message ;(.

Thx.

First part was awesome them. Still excited about it. I know little
things
make me happy. Merry Christmas everyone and to you and yours Allen
especially.

Allen Browne said:
Add these 2 lines to the Event Procedure code for the button's Click
event:

Me.[PutYourHyperlinkFieldTextBoxNameHere].SetFocus
RunCommand acCmdInsertHyperlink

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Vic said:
I've setup a field in one of my tables as a hyperlink and placed the
field
in
the form.

We are currently scanning documents to PDF file and then we attach
those
files to lets say a client. However in order to do this we have to go
to
the
insert option on the menu bar and then select hyperlink. Then this
takes
us
to the database directory and from there we choice the directory that
the
pdf
file is in. Lastly we select the file and we're done.

Here's the thing though. I would like to be able to setup on the field
in
the form a i.e. on double click that it those everything stated above
and
then all we have to do is select the file we want.

Can anyone help with this. I've searched through the help menu but it
really doesn't reference doing anything like this. I know I need to go
to
the event tab and pick on double click and select code builder. I
don't
know
anything about how to write that code.

Thx
 
A

Allen Browne

Another (more involved) option is to use ShellExecute:
http://www.mvps.org/access/api/api0018.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Allen Browne said:
There are several possible issues here. Some depend on policies that you
may not have permission to alter (depending on who manages your computer.)

If you are opening a file, such as:
C:\SomeFolder\SomFile.pdf
it might make a difference if you form the complete hyperlink, including
prepending the file:/// prefix.

Details in:
Hyperlinks: warnings, special characters, errors
at:
http://allenbrowne.com/func-GoHyperlink.html

Vic said:
Awesome. That was exactly what I was looking for. Thx.

Get a bit of another problem though. When you click on the hyperlink now
I
get this message. Hyperlink can be harmful to your computer and data.
To
protect your computer, click on those hyperlinks from trusted sources.
Do
you want to continue.

I've looked at the database and trusted sources but how do you add it or
prevent this message ;(.

Thx.

First part was awesome them. Still excited about it. I know little
things
make me happy. Merry Christmas everyone and to you and yours Allen
especially.

Allen Browne said:
Add these 2 lines to the Event Procedure code for the button's Click
event:

Me.[PutYourHyperlinkFieldTextBoxNameHere].SetFocus
RunCommand acCmdInsertHyperlink

I've setup a field in one of my tables as a hyperlink and placed the
field
in
the form.

We are currently scanning documents to PDF file and then we attach
those
files to lets say a client. However in order to do this we have to go
to
the
insert option on the menu bar and then select hyperlink. Then this
takes
us
to the database directory and from there we choice the directory that
the
pdf
file is in. Lastly we select the file and we're done.

Here's the thing though. I would like to be able to setup on the
field in
the form a i.e. on double click that it those everything stated above
and
then all we have to do is select the file we want.

Can anyone help with this. I've searched through the help menu but it
really doesn't reference doing anything like this. I know I need to
go to
the event tab and pick on double click and select code builder. I
don't
know
anything about how to write that code.
 
V

Vic

Thanks for the response Allen and everyone. This seems to have gotten really
complicated and beyond my ability. I'm totally lost at this point. A great
idea and an even greater solution thanks to Allen now complicated by some
silly error message.

Allen I've created the module and copied the code. I've tried following the
instructions as provided and I'm pretty sure everything I did is correct. I
labeled the module hyperlink. Now on the form I left the code you previously
provided which is as follows:

Private Sub LdHyperlink_DblClick(Cancel As Integer)
Me.[LdHyperlink].SetFocus
RunCommand acCmdInsertHyperlink

End Sub

This is what you see when looking at the info on the form: Load
Doc's\234911.pdf

Everything works exactly they way I need it to. The problem continues to be
when you go to look at the document i.e. click on it once it has been
selected you get that silly warning message.

I'm not sure if I'm suppose to do anything with that other code in the form.
I've tried change it to GoHyperlink(Me.(LdHyperlink]) but when you double
click now the directory doesn't come up to select a file. So I'm assuming
I've done something wrong here.

This is way out of my league so if you could please bring it down to my
level I would appreciate it.

If nothing else 98% of what I was looking for will work. Allen you've been
a great help. Sorry for the trouble.

Yes I did look at all the info from everyone. This silly message is just
out of my league to fix.

Thx everyone.
 
B

bhicks11 via AccessMonster.com

You need to use call gohyperlink("C:\YourFolder") in place of the ldHyperlink
Sub. I just tested it, it works great.

Bonnie
http://www.dataplus-svc.com
Thanks for the response Allen and everyone. This seems to have gotten really
complicated and beyond my ability. I'm totally lost at this point. A great
idea and an even greater solution thanks to Allen now complicated by some
silly error message.

Allen I've created the module and copied the code. I've tried following the
instructions as provided and I'm pretty sure everything I did is correct. I
labeled the module hyperlink. Now on the form I left the code you previously
provided which is as follows:

Private Sub LdHyperlink_DblClick(Cancel As Integer)
Me.[LdHyperlink].SetFocus
RunCommand acCmdInsertHyperlink

End Sub

This is what you see when looking at the info on the form: Load
Doc's\234911.pdf

Everything works exactly they way I need it to. The problem continues to be
when you go to look at the document i.e. click on it once it has been
selected you get that silly warning message.

I'm not sure if I'm suppose to do anything with that other code in the form.
I've tried change it to GoHyperlink(Me.(LdHyperlink]) but when you double
click now the directory doesn't come up to select a file. So I'm assuming
I've done something wrong here.

This is way out of my league so if you could please bring it down to my
level I would appreciate it.

If nothing else 98% of what I was looking for will work. Allen you've been
a great help. Sorry for the trouble.

Yes I did look at all the info from everyone. This silly message is just
out of my league to fix.

Thx everyone.
I've setup a field in one of my tables as a hyperlink and placed the field in
the form.
[quoted text clipped - 15 lines]
 
V

Vic

Thx for the effort. I've tried I don't know where all this information needs
to go or even if I'm putting it in the right place.

Thanks Anyway. Have a Merry Christmas.

bhicks11 via AccessMonster.com said:
You need to use call gohyperlink("C:\YourFolder") in place of the ldHyperlink
Sub. I just tested it, it works great.

Bonnie
http://www.dataplus-svc.com
Thanks for the response Allen and everyone. This seems to have gotten really
complicated and beyond my ability. I'm totally lost at this point. A great
idea and an even greater solution thanks to Allen now complicated by some
silly error message.

Allen I've created the module and copied the code. I've tried following the
instructions as provided and I'm pretty sure everything I did is correct. I
labeled the module hyperlink. Now on the form I left the code you previously
provided which is as follows:

Private Sub LdHyperlink_DblClick(Cancel As Integer)
Me.[LdHyperlink].SetFocus
RunCommand acCmdInsertHyperlink

End Sub

This is what you see when looking at the info on the form: Load
Doc's\234911.pdf

Everything works exactly they way I need it to. The problem continues to be
when you go to look at the document i.e. click on it once it has been
selected you get that silly warning message.

I'm not sure if I'm suppose to do anything with that other code in the form.
I've tried change it to GoHyperlink(Me.(LdHyperlink]) but when you double
click now the directory doesn't come up to select a file. So I'm assuming
I've done something wrong here.

This is way out of my league so if you could please bring it down to my
level I would appreciate it.

If nothing else 98% of what I was looking for will work. Allen you've been
a great help. Sorry for the trouble.

Yes I did look at all the info from everyone. This silly message is just
out of my league to fix.

Thx everyone.
I've setup a field in one of my tables as a hyperlink and placed the field in
the form.
[quoted text clipped - 15 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