Simulate a hyprlink field function on a textbox with with code

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

Guest

Hello

I have migrated my back end db to SQL server. The original Access tables had
some hyperlink data type field for web addresses, e-mails and file locations.
Since SQL Server does not provide such data types I have to transfer those
fields from hyperlink to ntext type.
Is there any code to use on forms and get the same functionality as with
hyperlink fields? What I mean is when, let’s say, I double click on a textbox
whose recordsource is a web address, e-mail or file location field to get the
same function as with Access hyperlink fields.

Thank you

GL
 
You can simply use the Application.FollowHyperlink() Method.

For this to work properly you'll need to ensure the proper prefixes are
present for the proper action to be taken. If it is a web address you need
to ensure http://...... appears, if it is a mail address then
mailto://......, if it's a file then the fullpath and filename will work.
From there The FollowHyperlink should work beautifully!
 
Thanks a lot
It works in each one of three cases

Daniel said:
You can simply use the Application.FollowHyperlink() Method.

For this to work properly you'll need to ensure the proper prefixes are
present for the proper action to be taken. If it is a web address you need
to ensure http://...... appears, if it is a mail address then
mailto://......, if it's a file then the fullpath and filename will work.
From there The FollowHyperlink should work beautifully!
 
Back
Top