Memo fields & Hyperlinks

P

Polite Elliot

I'm a bit green using Access so please bear with me (I'm also trying to use a
Norwegian version and my Norwegian isn't great)

I want to use a memo field to store text used on a webpage. Is there any way
of embedding active hyperlinks into a memo field?

Thanks
 
6

'69 Camaro

Hi, Elliot.
Is there any way
of embedding active hyperlinks into a memo field?

No. A hyperlink is stored as a special three-part data type. The memo
field stores text characters and has no way of identifying any of the three
parts of the hyperlink data type. It's just stored as if it was a regular
text string within the field.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
C

CyberTaz

Hi Elliott-

AFAIK, active hyperlinks cannot be embedded into Memo fields - they are
simply "high capacity" text fields.

You might consider storing the hyperlinks in Hyperlink fields and using a
Form to display the links adjacent to the Memo field content. |:>)
 
P

Polite Elliot

Thanks anyway.

In Lotus Notes, one can optionally 'treat field as HTML' allowing raw html
to be inserted into the page's code, which Domino then formats & displays.

Have to think of another way,

Tusen takk (a thousand thanks) as we say in Norway.
 
6

'69 Camaro

Hi, Jamie.
What do you think is the third part
of this 'three-part data type'?

I know that the three Properties of the Hyperlink class that are saved to
the record are the Hyperlink object's Address, SubAddress, and TextToDisplay
Properties. Access 2003 (perhaps earlier versions, as well) also has the
ScreenTip Property, which can be used for Hyperlinks to Access objects
within the current database application. Even so, no more than three parts
of the Hyperlink object will be saved to the field in the record.

Which one of these Properties did you think was the third part?
I'm a bit confused by this. My understanding is a 'hyperlink' is merely
a Jet column of type MEMO with a flag to indicate to the MS Access UI
that is has been flagged as a 'hyperlink'. External to the MS Access
UI, a 'hyperlink' is seen as MEMO.

I have no idea what external application you are using to view the
Hyperlink, but Microsoft Access's user interface is using the IDispatch
Interface of Windows COM to access the Hyperlink objects on Access forms and
reports, whether these Hyperlinks are in bound text boxes or unattached
labels. Please see the following Web pages for more information:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap5_78v9.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap5_5t9v.asp

Access uses the IDispatch Interface to retrieve (by using the InvokeKind
enum value equivalent to the "Get Property" you may be familiar with) or set
(by using the InvokeKind enum value equivalent to the "Let Property") each
of the three Hyperlink Property values of bound controls, so that these
string values can be retrieved from or placed into fields in the tables by
Jet. Please see the following Web page for the definitions of InvokeKind
enum values:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap6_4tb8.asp

These interfaces are setting and retrieving the three Hyperlink Properties
using the VT_BSTR (string) data type from OLE Automation Variant types, not
the one used for the Memo data type.

If you have evidence to the contrary that Access's user interface is
connecting directly to a field of Memo data type and identifies it as a
Hyperlink instead of a Memo data type whenever a flag is set, then please
provide a link to this information or present this evidence you've
discovered on your own, because I can't.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
6

'69 Camaro

Thank you, Jamie. You've been immensely helpful.
Key phrase: "Microsoft Access Hyperlink data type, which is based on
the Microsoft Jet Memo data type"

Makes sense. Since the combination of the three Hyperlink Properties could
exceed 255 characters, the designers of the Jet architecture planned for
this eventuality and store the Hyperlink field in the same data structure
defined for Memo fields and long binary data, rather than define a new data
structure.
http://www.microsoft.com/resources/documentation/sql/7/all/proddocs/en-us/msjet/jetch03.mspx

Key phrase: "there is no DAO Type property setting for Field objects
that corresponds to a Hyperlink field. This is because, at the Jet
database engine level, a Hyperlink field is actually a Memo field that
uses the dbHyperlinkField setting of the Attributes property to
identify itself to Microsoft Access"

These are very important, as is the next sentence that follows these two
sentences:

"While you can use DAO to create a Hyperlink field and work with its data,
its hyperlink functionality is only available when the database is opened
with Microsoft Access 97."

Jet can mark the field definition to indicate that it's a Hyperlink field,
not a Memo field, and store the three Hyperlink Properties (Address,
SubAddress, and TextToDisplay) in the record, but the Jet database engine
can't make the data in the Hyperlink field function like a Hyperlink. This
functionality requires the Access user interface (or some other COM-based
application), which uses the IDispatch Interface of Windows COM to make
these text strings useful, i.e., active Hyperlinks.

So, the Hyperlink field (the container) needs the Memo field with the
dbHyperlinkField Attribute set in order to store a Hyperlink object, while
the Hyperlink object (the pointer to another object) stored in that field
needs the right combination of the three-part data type derived from the
Hyperlink Properties (Address, SubAddress, and TextToDisplay) in order to
function as an active Hyperlink in Access.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
Top