SendObject w/ field from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top