hyperlink in a memo field

G

Guest

Hi All

Can there be a hyperlink in a memo field in either 03 or 07? If so how?

Thanks
Papi
 
A

Allen Browne

The text box in A2003 certainly can't display rich text of any kind.

With a quick look, it doesn't seem that the A2007 text box can display a
hyperlink within a rich text memo field either.

Even trying to assign it programmatically doesn't result in a clickable
link. Here's what I tried:
rs!MyRichMemo = "This memo includes a link to <a
href=""http://allenbrowne.com"">allenbrowne.com</a>."
The result is not useful.
 
G

Guest

Thanks for your efforts.

If I may, two quick questions.
1. How do I print just the memo field?
2. Designing a form, the command button wizard is not displaying any fields
for the current form when trying to "Match fields"

Any clues?

Thanks

Papi
 
A

Allen Browne

Re 1: In general you will want to create a report for each layout you
regularly want to print. It's easy enough to create a report that just
prints the memo field.

If want to know how to print just the memo field from the current record in
your form, see:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html

Re 2: Might be best to ask this as a separate question. I don't use the
wizards, so I don't really understand which of the command button wizard
options you are referring to here for "matching fields."

If the form is unbound, no list of fields will be available.
 
A

AnandaSim

G'day Allen,

It's a beaut one in Melbourne.

I experimented with the rich text memo field.

Here's some code:

Const Quote As String = """"

Sub showstuff()
Dim db As DAO.Database
Set db = CurrentDb

Dim rst As DAO.Recordset
Set rst = db.OpenRecordset("tblTest", dbOpenDynaset)

Dim fld As DAO.Field
Set fld = rst.Fields("mymemofield")
rst.Edit
fld.Value = "<a href=" & Quote & "http://www.theage.com.au/" &
Quote & ">http://www.theage.com.au</a>"
rst.Update
Debug.Print fld.Value

End Sub

There is some trapping going on somewhere.

1. If you use The Age as the visible text, then the hyperlink
appearance and behaviour is suppressed even though the HTML code is
there.

2. If you use the hyperlink itself as the visible text, then the
hyperlink appearance and behaviour is active and will launch the
default browser.

3. I think the View Source keyboard shortcut in IE is Ctrl+F3 -
however this is suppressed.

Ananda
 
A

Allen Browne

Amanda, thanks for posting that.

You are right: if you just type a valid HTML link into the rich-text memo in
A2007, it displays as a clickable link. But if you assign a valid HTML tag,
it does not work unless the visible part of the anchor is also a valid HTML
link.

IMHO, that's a fairly silly implementation.
The HTML tag is ignored.
Typing something like:
C:\Data\test.txt
doesn't work, but:
file:///C:/Data/test.txt
does.

Not pretty.
 

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

Similar Threads


Top