Use hyperlink within data type Long Text

TomBP

Registered User.
Local time
Yesterday, 22:06
Joined
Jul 6, 2006
Messages
49
Hi,

Is it possible to create a hyperlink within a part of a field formatted as long text? If so, how is this done?

See attachment for a print screen.


P.S. I know there is data type "Hyperlink" available but this is not an option.
 

Attachments

  • Print screen.jpg
    Print screen.jpg
    34.3 KB · Views: 197
It doesn't look good. There's nothing in text formatting with that option, but since long text is stored as HTML I thought that maybe a hyperlink could be added programmatically. So I created a table with a long text field and ran the following code.

Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrentDb
Set rs = db.OpenRecordset("LongTextTest")
rs.Edit
rs!lngText = rs!lngText & "<div><a href=""http://www.yahoo.com"">here</a></div>"
rs.Update
Debug.Print DLookup("lngText", "LongTextTest")

The output in the Immediate window was:

<div>Test</div>
<div>Test</div><div><a href="http://www.yahoo.com">here</a></div>

Note that <div>Test</div> was there before the code ran. The word "here" shows up but doesn't act like a hyperlink. I guess I'm not that surprised. If Microsoft included that capability in the Rich Text format, then they certainly would have made it available in the format options.
 
Thx for the attempt sneuberg. it was worth asking.
 

Users who are viewing this thread

Back
Top Bottom