SendObject

Jon.N

Registered User.
Local time
Today, 22:22
Joined
Nov 24, 2000
Messages
43
I have a form that has several buttons, 3 of which use the DoCmd.SendObject action to send an eamil, (each email is diffent from the other). There may arise an instance when in operation a user needs to send 2 or 3 emails consecutively to different people.

There is never a problem sending a first email but when sending a second email the message, 'The SendObject action was canceled' always appears.

Any ideas are most welcome.
 
Without looking at your code it is difficult to say what the problem might be. However if you want to send multiple e-mails to different people, then you need to nest the DoCmd.SendObject in a loop. Define the senders somehow (Query, multi-select listbox...) then loop through...
E-mail with code or post code if there are any more troubles.
Chris
 
Many thanks for your suggestions. All I have is 3 buttons each sends an email using the SendObject command to a different group of people. The email includes text and fields from the table.

The database is an inhouse application that will be used by a very small known group of people. They know which combination of emails to send after completing the form.

I have determined that if, for example, a user sends their first email they can send it again and again but they cannot send any other email from the form. I was wondering if there is some bug in Access. I have checked my code again and again and there is nothing wrong with it.

Here is a sample of one of the emails:

DoCmd.SendObject , , , Me.[Mang], Me.[ResMgr], , "New Starter ID: " & Me.[ID], "Please note that " & Me.[Staff] _
& ", ID: " & Me.[ID] & " will be joining the company shortly. The equipment that is required is detailed below." & vbCrLf _
& vbCrLf & "(To view the New Starter record in full please see the New Starters database)." & vbCrLf & vbCrLf & Chr(187) _
& " Start Date: " & Me.[StartDate] & vbCrLf & vbCrLf & Chr(187) & " Manager: " & Me.[Manager] & vbCrLf & vbCrLf & Chr(187) _
& " Location: " & Me.[Location] & vbCrLf & vbCrLf & Chr(187) _
& " Scope: " & Me.[Scope] & vbCrLf & vbCrLf & Chr(187) & " PSU: " & Me.[PSUs] & vbCrLf & vbCrLf & Chr(187) _
& " Other: " & Me.[Other] & vbCrLf & vbCrLf & Chr(187) & " Notes: " & Me.[Notes]

Once again many thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom