Blank Email Text with SendObject

G

Guest

I am using the SendObject method to populate an email message with data from
a form, etc. The code is below. It works fine for me. But I have put the
database in a folder on a network shared drive and when another user on
another computer clicks the button to generate the email message, the Address
and Subject fields of the email message populate fine, but the message text
comes out completely blank. No error message comes up, the email body is
just blank.

Do I need to configure Access a special way on this other computer? Is is a
security/unsafe expressions issue? Do I need to configure Outlook in special
way on the other computer?

This is very frustrating as, again, it works fine on my machine. I have
encountered these types of issues before when putting a database in a shared
folder. Does anyone have any general advice about making a database function
well in a shared environment?

Thanks in advance.

DEI

Code Sample:

em = Forms!frmREQUESTS.EMAIL

DoCmd.SendObject , , , em, , , "Catering Request Confirmation #" &
Forms!frmREQUESTS.REQCON, _
"Nutrition Services has received your recent catering order for:" & vbCr &
vbCr & _
"Date: " & Forms!frmREQUESTS.EVENTDATE & vbCr & _
"Time: " & Forms!frmREQUESTS.BEGX & vbCr & _
"Location: " & Forms!frmREQUESTS.BLDGRM & vbCr & _
"Number Attending: " & Forms!frmREQUESTS.NUMGUESTS & vbCr & _
"Confirmation Number: " & Forms!frmREQUESTS.REQCON & vbCr & _
"Requested by: " & Forms!frmREQUESTS.LNAME & ", " & Forms frmREQUESTS.FNAME
 
A

Arvin Meyer [MVP]

Never run a database front-end from a network drive. Always split the
database, link the database, and give each user their own copy which is to
be run from their own workstation.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

DEI said:
I am using the SendObject method to populate an email message with data from
a form, etc. The code is below. It works fine for me. But I have put the
database in a folder on a network shared drive and when another user on
another computer clicks the button to generate the email message, the Address
and Subject fields of the email message populate fine, but the message text
comes out completely blank. No error message comes up, the email body is
just blank.

Do I need to configure Access a special way on this other computer? Is is a
security/unsafe expressions issue? Do I need to configure Outlook in special
way on the other computer?

This is very frustrating as, again, it works fine on my machine. I have
encountered these types of issues before when putting a database in a shared
folder. Does anyone have any general advice about making a database function
well in a shared environment?

Thanks in advance.

DEI

Code Sample:

em = Forms!frmREQUESTS.EMAIL

DoCmd.SendObject , , , em, , , "Catering Request Confirmation #" &
Forms!frmREQUESTS.REQCON, _
"Nutrition Services has received your recent catering order for:" & vbCr &
vbCr & _
"Date: " & Forms!frmREQUESTS.EVENTDATE & vbCr & _
"Time: " & Forms!frmREQUESTS.BEGX & vbCr & _
"Location: " & Forms!frmREQUESTS.BLDGRM & vbCr & _
"Number Attending: " & Forms!frmREQUESTS.NUMGUESTS & vbCr & _
"Confirmation Number: " & Forms!frmREQUESTS.REQCON & vbCr & _
"Requested by: " & Forms!frmREQUESTS.LNAME & ", " & Forms
frmREQUESTS.FNAME
 
G

Guest

Will that solve the problem with the SendObject method? I understand about
splitting the database, but the sendobject method is going to be in a public
procedure in a code module that will reside on the users work station, is it
not?

What you are desribing is putting the forms, querys, reports, etc. on the
persons workstation but leaving the underlying tables on the network drive,
right?

Will that effect the send object?

Thanks.

DEI
 
A

Arvin Meyer [MVP]

Answers in line:

DEI said:
Will that solve the problem with the SendObject method? I understand about
splitting the database, but the sendobject method is going to be in a public
procedure in a code module that will reside on the users work station, is it
not?

What you are desribing is putting the forms, querys, reports, etc. on the
persons workstation but leaving the underlying tables on the network drive,

Correct

Will that effect the send object?

It may. The mail program may not have a client on the server, so it doesn't
know what to do with SendObject. Also while the database file may be running
from the server, the application is running on your desktop, so it's making
an extra round trip and possibly conflicting with another user. Those
conflicts often cause corruption.

There is a bug in SendObject in Access 2000 versions:

http://support.microsoft.com/default.aspx?scid=kb;en-us;260819

That may be affecting you as well.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

Thanks for the help, and I did in fact create a database front end, put the
tables in a shared network drive, etc., but the email message is still not
working properly.

Is there a security setting I need to change? Is there something in Outlook
that I need to change to allow the message text to be sent to the email
message? Do I need to digitally sign the code somehow?

Is it possible that access regards the SendOject method as an unsafe
expression and blocks its functionality? If so, is there a way to reset
Access's security, beyond the macro security setting?

Thanks.
 

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