SendObject Action in a Macro Query

M

Michael D. McGill

Is there any way I can have the data I want to send to a user using the
SendObject Action appear in the body of the message as opposed to being an
attachment?

I have an app where I am sending a user a small piece of data to follow-up
on (an ordernumber and customer number) I would hate for the user to have to
open up attachments.

Thanks in Advance!

Mike
 
S

Steve Schapel

Mike

You can use a calculated field in a query, or a calculated control on a
form, to compose the text that you want to go in the email body, and
then use a DLookup() function (in the case of a query), or a reference
to the form textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTextbox]
.... in the Message Text argument of the SendObject macro.
 
G

Guest

Hi Steve
Thanks for that I've got that to work well with the syntax you suggest but
it seems that the message is limited to a total of 255 characters. I've
checked back to the source field in the table to see if I had set that to a
text box format i.e. 255 characters, but it is set to a Memo format so I
should be able to send a longer message, shouldn't I? Any suggestions as
sending messages as attachments is a bit not user friendly for the recipient.
Cheers Bob

Steve Schapel said:
Mike

You can use a calculated field in a query, or a calculated control on a
form, to compose the text that you want to go in the email body, and
then use a DLookup() function (in the case of a query), or a reference
to the form textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTextbox]
.... in the Message Text argument of the SendObject macro.

--
Steve Schapel, Microsoft Access MVP

Is there any way I can have the data I want to send to a user using the
SendObject Action appear in the body of the message as opposed to being an
attachment?

I have an app where I am sending a user a small piece of data to follow-up
on (an ordernumber and customer number) I would hate for the user to have to
open up attachments.

Thanks in Advance!

Mike
 
S

Steve Schapel

Bob,

I think one of the things that cause this to happen is if you are using
formatting of the text. Do you have anything in the Format property of
the textbox on the form?
 
G

Guest

Thanks for that, it's much appreciated, but it doesn't look like that is the
problem. I've tried changing the text to Courier. I've tried changing to a
combo box but it doesn't make any difference. I also have a button on the
form to send this text box to a Report. (to write letters) and there is no
problem here with number of words being restricted. Any further thoughts?
 
G

Guest

Sorry not to be clear I'm using the second suggestion i.e.
=[Forms]![NameOfForm]![NameOfTextbox]
Cheers Bob
 
G

Guest

The Control Source is a memo field "Notes" in a Contacts form (ContactF)
which is based on a contacts table (ContactsT).The entry in message text is
=[Forms]![ContactF]![Notes]
I hope that's clear.
Thanks for sticking with this.
Cheers Bob
Steve Schapel said:
Bob,

.... and what is the Control Source of the textbox?

--
Steve Schapel, Microsoft Access MVP

Sorry not to be clear I'm using the second suggestion i.e.
=[Forms]![NameOfForm]![NameOfTextbox]
Cheers Bob
 
S

Steve Schapel

Bob,

Well, I would be hapy to stick with it, but I am afraid I don't know
what the problem is. There are many situations where a memo field is
truncated, but your setup is very simple, and doesn't seem to do any of
the memo-truncating things that I know about, so I am afraid I can't
help any further at this point.
 

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