My codes start an email in outlook.
However, somehow, sometimes, the "Display" method takes a long time to execute. When this happen, the Access form screen looks frozen. If a user tries clicking on something, the following warning appears.
"This action cannot be completed because the other application is busy. Choose 'Switch To' to activate the busy application and correct the problem."
The warning message flicks and the user has a hard time clicking on it. After a few seconds, the Outlook email appears.
I noticed that, if I click "Send and Receive" on Outlook and then immediately go to the Access form, click the button to start the mail, I will surely get this warning. (By the way, for some reason, there is no security warning in my Outlook 2003.)
Here are my questions:
1. Should this message appear in the first place? I do not think this warning should appear because there is no dialog box open in Outlook 2003.
2. If this warning should appear because my code takes long time (I am not sure why), is that any way to avoid/supress it?
Seaport
Code:
With objOutlookMsg
.To=sEmails
.Body = strMessage
.Display
End With
"This action cannot be completed because the other application is busy. Choose 'Switch To' to activate the busy application and correct the problem."
The warning message flicks and the user has a hard time clicking on it. After a few seconds, the Outlook email appears.
I noticed that, if I click "Send and Receive" on Outlook and then immediately go to the Access form, click the button to start the mail, I will surely get this warning. (By the way, for some reason, there is no security warning in my Outlook 2003.)
Here are my questions:
1. Should this message appear in the first place? I do not think this warning should appear because there is no dialog box open in Outlook 2003.
2. If this warning should appear because my code takes long time (I am not sure why), is that any way to avoid/supress it?
Seaport