appearance of hyperlink in a report

A

amanda

so, in a source table, i have a column full of e-mail
addresses inserted as "mailto:" hyperlinks. i want my
report to include those e-mail addresses, but ever since i
changed their data type from text to hyperlink, they show
up in the report, not as just the display text, but as
that along with the hyperlink directions, like
this: "(e-mail address removed)#mailto:[email protected]?
subject=The Up 'n' Atom Mobile" (where "The Up 'n' Atom
Mobile" is the default subject that i entered for e-mail
directed toward this person).
how can i avoid this long string -- obviously, all i want
is the e-mail address itself.
while i'm on the subject, is there any way to get the
hyperlink to work from the report's print preview? i'm
doubtful about this, but wouldn't it be nice.
 
F

Fredg

Amanda,
Why did you bother to change the field from text to hyperlink?

If you set it to text, just enter the actual email address as text:
(e-mail address removed) (No "MailTo:")

Then to actually use it to send mail, code the field's double click event
(or a command button if you would rather do it that way):
Application.FollowHyperlink "MailTo:" & [ControlName]

This has the advantage of making changes to the field easy
(no accidental sending of an email), and solves your
report printing problem.

And NO, there is no way to get the hyperlink to work in Preview.
 
A

amanda

fred, thanks for your advice. i'm having some problems
putting it into action, though. first, it appears that
setting an event procedure is only an option on forms,
whereas i use exclusively tables, where "event" is not
part of the properties sheet.
however, just to see if i could make it work, i created a
form and entered the
text 'Application.FollowHyperlink "MailTo:" & [E-mail
Address]' into the property space for "OnDblclk Event".
however, when i double-clicked in that field afterward, i
was told the macro didn't exist. i have to admit, i don't
know macros at all. there are no macros stored in this
database.
what can you tell me (fred or anyone else)?

-----Original Message-----
Amanda,
Why did you bother to change the field from text to hyperlink?

If you set it to text, just enter the actual email address as text:
(e-mail address removed) (No "MailTo:")

Then to actually use it to send mail, code the field's double click event
(or a command button if you would rather do it that way):
Application.FollowHyperlink "MailTo:" & [ControlName]

This has the advantage of making changes to the field easy
(no accidental sending of an email), and solves your
report printing problem.

And NO, there is no way to get the hyperlink to work in Preview.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


amanda said:
so, in a source table, i have a column full of e-mail
addresses inserted as "mailto:" hyperlinks. i want my
report to include those e-mail addresses, but ever since i
changed their data type from text to hyperlink, they show
up in the report, not as just the display text, but as
that along with the hyperlink directions, like
this: "(e-mail address removed)#mailto:[email protected]?
subject=The Up 'n' Atom Mobile" (where "The Up 'n' Atom
Mobile" is the default subject that i entered for e-mail
directed toward this person).
how can i avoid this long string -- obviously, all i want
is the e-mail address itself.
while i'm on the subject, is there any way to get the
hyperlink to work from the report's print preview? i'm
doubtful about this, but wouldn't it be nice.


.
 
F

Fredg

Amanda,
Never, ever, use a Table for anything other than storing data.
It doesn't have events because it's only supposed to hold data, not
manipulate it.
In fact, other than for testing, you have no need to even see the table.

On the form that you just made, in Design View right-click on the control.
Select Properties.
Click on the Data tab.
On the Double-click event line type
[Event Procedure]
Then click on the button with the 3 dots that will appear on that line.
The event code window will open with the cursor flashing between 2 already
existing lines of code.
Between those 2 lines write
Application.FollowHyperlink "MailTo:" & [E-mail Address]

Exit the code window.
Run the form.
(I assume the actual name of the field is [E-Mail Address].

If you must use a table type layout, you can open a form
either in continuous form view, or in form datasheet view.
But do not use the table itself.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


amanda said:
fred, thanks for your advice. i'm having some problems
putting it into action, though. first, it appears that
setting an event procedure is only an option on forms,
whereas i use exclusively tables, where "event" is not
part of the properties sheet.
however, just to see if i could make it work, i created a
form and entered the
text 'Application.FollowHyperlink "MailTo:" & [E-mail
Address]' into the property space for "OnDblclk Event".
however, when i double-clicked in that field afterward, i
was told the macro didn't exist. i have to admit, i don't
know macros at all. there are no macros stored in this
database.
what can you tell me (fred or anyone else)?

-----Original Message-----
Amanda,
Why did you bother to change the field from text to hyperlink?

If you set it to text, just enter the actual email address as text:
(e-mail address removed) (No "MailTo:")

Then to actually use it to send mail, code the field's double click event
(or a command button if you would rather do it that way):
Application.FollowHyperlink "MailTo:" & [ControlName]

This has the advantage of making changes to the field easy
(no accidental sending of an email), and solves your
report printing problem.

And NO, there is no way to get the hyperlink to work in Preview.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


amanda said:
so, in a source table, i have a column full of e-mail
addresses inserted as "mailto:" hyperlinks. i want my
report to include those e-mail addresses, but ever since i
changed their data type from text to hyperlink, they show
up in the report, not as just the display text, but as
that along with the hyperlink directions, like
this: "(e-mail address removed)#mailto:[email protected]?
subject=The Up 'n' Atom Mobile" (where "The Up 'n' Atom
Mobile" is the default subject that i entered for e-mail
directed toward this person).
how can i avoid this long string -- obviously, all i want
is the e-mail address itself.
while i'm on the subject, is there any way to get the
hyperlink to work from the report's print preview? i'm
doubtful about this, but wouldn't it be nice.


.
 

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