473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SendObject in Access2K works sporadically

Sam
The db I use has code (below) to send an email to an individual, based
on the completion of an action with the record. This many happen for
one record at a time, or 25 records at a time, some sequential, some
not.

Problem is it only works sometimes. Generally, if I try to use it on a
second record in a series, it LOOKS like it is working (the status bar
in the lower left says "calculating..." then returns to form view), but
does not actually DO the process. But sometimes it works flawlessly for
any number of record updates, and then stops working with no indication
of a problem. And there is no telling when it will work and when it
won't. It doesn't throw a debug at me and I have to close the db to be
able to get it to work.

I am not SQL savvy enough to figure what is or isn't working. Any
ideas?

Thanx,
Sam

CODE
Private Sub chkspvsr_Click()
On Error GoTo Err_chkspvsr_Click

Dim CHK As Integer
Dim BNum As Variant
Dim Client As String
Dim email As String
Dim DScrip As Variant
DScrip = Me!Descr
BNum = Me!txtBCRNum
Client = Me!txtClientName
CHK = Me!chkspvsr

If CHK = -1 Then
Me!lblMsg.Visible = True

DoCmd.SendObject , , acFormatTXT, "Us*******@Company.com", , , "BCR
# '" & _
BNum & "' for '" & Client & "' is TESTED and COMPLETE.",
"DESCRIPTION OF CHANGE - " & DScrip
Me!lblMsg.Visible = False
Else: Exit Sub
End If

Exit_chkspvsr_Click:
Exit Sub

Err_chkspvsr_Click:
Me!lblMsg.Visible = False
MsgBox Err.Description
Resume Exit_chkspvsr_Click
End Sub

Nov 13 '05 #1
1 1084
So you change the Sub to a Function and make the return value a
Boolean. At the top of the function, you declare the default value to
false. If the mail sends, you set it to true. In the error trapping,
you set it to false. Then if the function returns False, you do
something - flag the record, write the failure to a table, whatever.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bret Shortall | last post by:
Using the SENDOBJECT action command in a Macro works fine if you hard code in their email address. SENDOBJECT TO bret@emailaddress.com SUBJECT This is the Subject line...
3
by: J Bunton | last post by:
DoCmd.SendObject Using windows2000 and OutLook Express v6 I have Access 2000 and Access 97 installed on the same machine. To achieve this and so that Access applications open with the...
1
by: Lauren Quantrell | last post by:
I am using the following to attach a report, in HTML format to an e-mail using Access2K: DoCmd.SendObject acSendReport, "myReportName", acFormatHTML, , , , "mySubject", "myTExtBody", True,...
8
by: Andy Kasotia | last post by:
Warning message in Outlook 2003 while using SendObject. When i try to use sendobject to send an email, a warning massage pops up, saying that "Outlook is trying to send an email.......if this is...
3
by: Fred Zuckerman | last post by:
Hello All, I had written a quick email procedure for a client that uses DoCmd.SendObject. However they have the SR-1 version of Access 2K. They do not have the SP-3 upgrade. The procedure does...
1
by: jerry.ranch | last post by:
I collect information from my clients with an xls file I import the xls data into my access table. I don't have them put info directly into Access, because, despite the drop downs I have for...
2
by: Andy_Khosravi | last post by:
I posted this question about two days ago, but for some reason it never actually got put up. I couldn't' find it with searches, so I am re-posting it now. I apologize if this is a double post. ...
4
by: jBunton | last post by:
I am using send object to generate emails BUT it works once then not again until I close and reopen my application. Thus in the code below only 1 email is generated - doesn't matter which of the...
0
by: (PeteCresswell) | last post by:
Another thread got me going on SendObject. Works like a champ for emailing somebody a .SNP of a report as in: DoCmd.SendObject acSendReport, "rptMaturities", "Snapshot Format", "pCresswell", ,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.