Followhyperlink

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

Guest

Good day,

I have a customer information form. In this form I have a field called
website. I would like to have it so on Dbl Click it opens explorer and goes
to the website.

Any help would be appreciated.

THanks in advance.
 
application.followhyperlink me.controlname

application.followhyperlink strVariable

application.followhyperlink "http://www.google.com"

application.followhyperlink "c:\path\myDatabase.mdb"

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Thankyou for your response. I used "application.followhyperlink
me.controlname" now I get Run-Time Error 490 (Cannot open specified File)

The Field name is Cwebsite and its data type is text

application.followhyperlink me.Cwebsite

Any help would be appreciated.

Thanks

Kyle.
 
Hi Kyle,

you need to preface the URL with "http://" ... www is not enough...

along with checking to ensure the URL is valid, you can do something
like this:

if left(me.Cwebsite,7) <> "http://" then
me.Cwebsite = "http://" & me.Cwebsite
end if

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Hi Crystal.

Thanks for taking the time to help me with this. I typed in
Http://www.google.ca in the field and I still get the same error 490 with the
same message.

Do I need to declare the string as a hyperlink. I am new with codeing.

I look forward to hearing from you.

Thanks Again
 
strive4peace said:
Hi Kyle,

you need to preface the URL with "http://" ... www is not enough...

along with checking to ensure the URL is valid, you can do something
like this:

if left(me.Cwebsite,7) <> "http://" then
me.Cwebsite = "http://" & me.Cwebsite
end if

Ah, but what if it's "https://"? It's a pain, but you probably have to
allow for that, too.
 
Hi Dirk,

good point! Thanks

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Okay it works. My fault. Thank you very much. Actually is there any way to
have it so the code automatically stick http:// infront of the URL when there
is on www?
 
Hi Kyle,

to test and make sure your computer has the right associations, try this:

click on Start and choose Run

Http://www.google.ca
ENTER

if it doesn't go, then that is the problem...

if it goes, then perhaps you can try assigning your url to a string...

'~~~~~~~~~~~~~~~~~~
dim mURL as string

'check me.Cwebsite to make sure it has what it needs

mURL = me.Cwebsite

'comment next line after things work ok
msgbox mURL,,"URL"

application.followhyperlink mURL

'~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Hi Kyle,

Great!

if left(me.Cwebsite,7) <> "http://" then
me.Cwebsite = "http://" & me.Cwebsite
end if

but Dirk had a valid point -- it may not be "http://", it may be
something like "https://"

as your data gets corrected, you can manually make adjustments when it
doesn't work right...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
you're welcome, Kyle ;) happy to help

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


okay go it

Application.FollowHyperlink "http://" & "" & [CwebSite]

Thanks everyone.!!! Cheers


strive4peace said:
Hi Dirk,

good point! Thanks

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top