Sendobject works only once

I

Irshad Alam

The below code I use to send report via outlook express 6. It works fine. But
only once. Second time it does not work neither it produces error.

DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , , "Job-" &
Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value, "Reference to the subject
claim, attached pls. find the claim form. Regards. Irshad"


Again when I close the mdb and open again, then it works once only.

It consumes time.

Please advice what additional code I should use so that, it works as many
times as I want.

Regards

Irshad
 
D

Daniel Pineault

You don't give too many details. Is it used in a loop? It is a known issue
that SendObject is unreliable in loops. It may work and then not...

Give use some more details, give us the entire code (sub or function) you
are using.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
I

Irshad Alam

Hi Sir,

No, it is not used in a loop. The entrire code is as follows :

Private Sub Label59_Click()
DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , ,
"Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value, "Reference to the
subject claim, attached pls. find the claim form. Regards. Irshad"
End Sub


Please advice.

Regards

Irshad
 
T

Tony Toews [MVP]

Irshad Alam said:
The below code I use to send report via outlook express 6. It works fine. But
only once. Second time it does not work neither it produces error.

Are you running A2000? Have you installed the latest Service Pack? I
vaguely recall this was a bug back then.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
I

Irshad Alam

Sir,

I am using MS Office 2000 and Windows XP Professional Service Pack 2.

Please advise a solution how to handle this situation, as in a day I using
this send object minimum 50 times. After once time use, I am closing and
opening again the mdb to run the command of sendobject.

Regards

Irshad
 
T

Tony Toews [MVP]

Irshad Alam said:
I am using MS Office 2000 and Windows XP Professional Service Pack 2.

Please advise a solution how to handle this situation, as in a day I using
this send object minimum 50 times. After once time use, I am closing and
opening again the mdb to run the command of sendobject.

Ok, do you have Office 2000 SP3 installed? Click on Help and About
Microsoft Access. If you do not have SP3 installed then download it
and install it.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
I

Irshad Alam

Thank you so much.

I installed the service pack 3 and it worked fine

Now I am able to click and message as many times I wanted, no need to quit
database and open again.

Regards

Irshads
 

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