Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't open e-mail session

Status
Not open for further replies.

jmk2z

Programmer
Oct 29, 2002
18
US
I'm trying to send e-mail from an Access form, but when I try, I get an error saying "Microsoft Access can't open the mail session. Check your mail application to make sure that it's working properly." I am using MS Outlook. What's wrong?
 
The first troubleshooting step would be to ensure Outlook is open. If you are trying to send an email without opening Outlook (either through code or manually), you will receive this error.

The next step would be to see if you can successfully send an new email from Outlook. There may be a network or application issue that you are not aware of.

If both of these steps pass, then you need to check the reference code used to open/send the message.

HTH,

Angela
 
Outlook is open and works fine on its own. I get the error when I simply select a table, then click file-send..., so it doesn't have anything to do with any code that was written. Any other ideas? Someone mentioned something about MAPI - I'm not really sure what that is.
 
MAPI is a system built into Microsoft Windows that enables different e-mail applications to work together to distribute mail. As long as both applications are MAPI-enabled, they can share mail messages with each other.

Unfortunately, my system didn't create a mail message with the table as an attachment either. The best bet may be to write a macro and send it that way.

--Angela
 
How do I write a macro? Do I create a button - and then do "build event" and write the code myself using the sendobject command?
 
You can write a macro or use the sendobject command - whichever is more comfortable for you. To write a macro, open the macro tab in Access, and use the SendObject function. You will need to specify the name of the table, the recipients and the format of the attachment.

Then, if necessary, you can create a command button and choose the "run macro" action in the miscellaneous category.
Choose the Macro you just created and label it.

HTH,

Angela
 
Creating a Macro may not be the answer. I faced this problem previously (using Access97). Sending the email worked from some machines but didn't from others, regardless of whether Outlook was open. We compared all settings and couldn't find the answers. This was never resolved, please post if you find a good answer. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top