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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access sends triple emails

Status
Not open for further replies.

Ploemen

Instructor
Jul 15, 2004
12
NL
Hi everybody,

With help of this forum I was able to create a VBA code that helps to send two attachments in one email. This code works perfectly.

However, when I run this code with a form or via a macro Access sends the same email three times. It looks as if it is in a sort of loop.

I have done nothing special with the forms or macros. I have just programmed a command SendMessage to activate the code.

Can anybody help me with this problem?

Thanks, Maarten
 
Not sure where in the form you might call this code from, but some events (format for example) fire more than once per process. If you think this might be a problem, throw in some debug.prints after each call and see how many times the code is actually getting executed.
Happy Holidays!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top