Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SendObject w/ field from form

1 view
Skip to first unread message

Dj

unread,
Aug 31, 2006, 12:29:02 PM8/31/06
to
My form has an Email button which runs a macro which SendObject's a report.
I want my Subject line to be a table field from my report. Is that possible
using my Macro? If not, is it possible using code? I have minimal
experience (at best) writing code. If it's possible using code, could
someone give me a hint on where to start? Thx, DJ

Steve Schapel

unread,
Sep 3, 2006, 4:56:01 PM9/3/06
to
DJ,

YOu can use an expression in the Subject argument of the SendObject
action in your macro. You can't really refer to a field from your
report. But you can reference the value of a control on a form, using
syntax such as...
=[Forms]![NameOfForm]![NameOfTextbox]
Of course, the form needs to be open at the time, and the value from the
current record will be used.
Alternatively, you could use a Domain function such as DLookup() to
retrieve the value of a field from a table or query.

--
Steve Schapel, Microsoft Access MVP

0 new messages