Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink Address not working 1

Status
Not open for further replies.

PennWhite

Programmer
Sep 2, 2002
20
US
ACC03

I have a hyperlink field in a form. I enter the URL in the filed by hand or imported from a bookmark.htm file and the nothing happens when I click the link.

I looked at 'Edit Hyperlink' and the 'Text to Display' shows the URL but the 'Address' field is empty. If I cut and paste the URL into this field the link works fine.

Any ideas greatly appreciated.

Thank you,

Penn
 
The contents of hyperlink fields should look like this:
www.tek-tips.com#You can see this if you go to the start of the field in question (ie set Go to Start of Field under Keyboard in Options).

I find that fields do not import in this format - the bit between the hash signs is usually missing. You can use an update query to add it to each field, if this is the case.
 
Sorry about my last reply. I should have said that this happened to me in forms too, so I put in a bit of code into the OnChange event to add #<address># to the text of the field, if it was missing.
 
Thank you very much. That helped a lot. I'm having a little trouble with the SQL for the Update query. This is what I have but it doesn't seem to work.

UPDATE tblURLTest SET tblURLTest.URL = & "#" & [URL] & "#" WHERE (((tblUR...er than "%" because it's an Access database.
 
Take a look at the HyperLinkPart method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That got it. Thanks very much. Penn


Private Sub Form_Current()
If HyperlinkPart(Me.URL, 2) = "" Then
'MsgBox "Hyperlink incomplete"
Me.URL = Me.URL & "#" & Me.URL & "#"
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top