Inserting Hyperlink into Form

G

Guest

I'm trying to insert a hyperlink into a text box on a form, but have been
unsuccessful. Can someone provide some help. Thank you.
 
S

Sachin Sancheti

Some workaround.
Set the forecolor to blue and text underlined. So the text would appear
as hyperlink.
Trap the click event of the text box and open a new IE to navigate to
the hyperlink.
 
T

Tom R

Kathy said:
Could you explain a little more of how to "trap the click event of the text
box"

Kathy,

You need to do two things. First, in design mode, click on the text
control you intend to use for the hyperlink. Right click and choose
Advanced Properties. In the Tag section, put the URL for the hyperlink
here. Then, in the Script Editor, here's what you'll need to do to
trap the event: (this is sample code, assuming your text control is
named lblClick)

Sub lblClick_Click()
Set objWeb = CreateObject("InternetExplorer.Application")
objWeb.Navigate Item.GetInspector.ModifiedFormPages _
("P.2").Controls("lblClick").Tag
objWeb.Visible = True
Set objWeb = Nothing
End Sub

I'm using a Post form type, so the GetInspector.ModifiedFormPages page
needs to match the page for your form. This will launch a new browser
window and navigate to the site in the Tag property.

Hope this helps.

Tom Renfro
Integris Health, Oklahoma City
 

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