Email with current LogID included

R

RJB

I have an invoice form with a button to allow the user to email a
notification to another person in the company. Basically so a customer
service person can enter an order, then a manager can check/approve it
before printing it. It works, but I'm trying to eliminate some chance for
user error.

Currently, I have a macro set up with a "Send Object" action so that "On
Click' of the button, an email window (Outlook) opens up with the "To:"
section filled in and the subject field reads "New Order Entered" and the
message body is blank.

Is there a way I can automatically have the subject display the current
LogID? So that if I just entered information for LogID 351, the email
subject will display as
"New Order Entered - Log# 351".

If so...can I simply add an expression in the macro's "subject" line?

Thanks.
 
D

Damian S

Hi RJB,

Use the sendobject method instead of in a macro like this:

docmd.SendObject acSendNoObject, , , TOFIELD, CCFIELD, BCCFIELD,
SUBJECT_HERE, BODY_HERE, FALSE

Hope this helps.

Damian.
 
R

RJB

Thanks Damian...that is doing pretty much the same as the macro. I can't get
it to recognize the LogID variable. Here is what I've got in the "OnClick"
event right now.

DoCmd.SendObject acSendNoObject, , , "[email protected]", CCFIELD,
BCCFIELD, "New Order Entered - Log # [LogID]", BODY_HERE, False

I've tried changing [LogID] to [Tbl_Workorder]![LogID], I've tried taking it
out of the quotes...no luck. I'm sure I'm overlooking something obvious and
easy, but what is it?

Thanks,
RJB
 
Top