Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: HYPERLINK

Geek News

HYPERLINK
Vic 12/20/2008 11:09:00 AM
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
Re: HYPERLINK
"bhicks11 via AccessMonster.com" <u44327[ at ]uwe> 12/20/2008 1:12:46 PM
You need the common dialog. Here's a couple of resources.

http://www.databasedev.co.uk/common_dialog.html

http://support.microsoft.com/kb/279508

Bonnie
http://www.dataplus-svc.com


Vic wrote:
[Quoted Text]
>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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1

Re: HYPERLINK
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> 12/20/2008 1:43:36 PM
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
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vic" <Vic[ at ]discussions.microsoft.com> wrote in message
news:37FE9BDC-CBB5-404D-B42C-C68B3BFDF12C[ at ]microsoft.com...
[Quoted Text]
> 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

Re: HYPERLINK
Vic 12/20/2008 6:53:01 PM
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" wrote:

[Quoted Text]
> 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
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Vic" <Vic[ at ]discussions.microsoft.com> wrote in message
> news:37FE9BDC-CBB5-404D-B42C-C68B3BFDF12C[ at ]microsoft.com...
> > 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
>
>
Re: HYPERLINK
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> 12/21/2008 1:53:56 AM
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
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vic" <Vic[ at ]discussions.microsoft.com> wrote in message
news:8B895F2C-E334-435F-B60D-823EC0196094[ at ]microsoft.com...
[Quoted Text]
> 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" wrote:
>
>> 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
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "Vic" <Vic[ at ]discussions.microsoft.com> wrote in message
>> news:37FE9BDC-CBB5-404D-B42C-C68B3BFDF12C[ at ]microsoft.com...
>> > 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
>>
>>

Re: HYPERLINK
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> 12/21/2008 2:06:10 AM
Another (more involved) option is to use ShellExecute:
http://www.mvps.org/access/api/api0018.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> wrote in message
news:%23T5x97wYJHA.5108[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> 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" <Vic[ at ]discussions.microsoft.com> wrote in message
> news:8B895F2C-E334-435F-B60D-823EC0196094[ at ]microsoft.com...
>> 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" wrote:
>>
>>> Add these 2 lines to the Event Procedure code for the button's Click
>>> event:
>>>
>>> Me.[PutYourHyperlinkFieldTextBoxNameHere].SetFocus
>>> RunCommand acCmdInsertHyperlink
>>>
>>> "Vic" <Vic[ at ]discussions.microsoft.com> wrote in message
>>> news:37FE9BDC-CBB5-404D-B42C-C68B3BFDF12C[ at ]microsoft.com...
>>> > 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.

RE: HYPERLINK
Vic 12/21/2008 2:40:05 PM
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.

"Vic" wrote:

[Quoted Text]
> 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
RE: HYPERLINK
"bhicks11 via AccessMonster.com" <u44327[ at ]uwe> 12/21/2008 4:52:16 PM
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

Vic wrote:
[Quoted Text]
>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]
>>
>> Thx

--
Message posted via http://www.accessmonster.com

RE: HYPERLINK
Vic 12/21/2008 6:43:01 PM
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" wrote:

[Quoted Text]
> 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
>
> Vic wrote:
> >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]
> >>
> >> Thx
>
> --
> Message posted via http://www.accessmonster.com
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net