Email problem

G

Guest

I have one user with problems and I believe it is related to her Outlook
application. The following is my code:

Private Sub cmdSubmit_Click()
Dim strMSG As String
Dim curAmount As Currency
Dim strBond As String
Dim strChecks As String

curAmount = Nz(Me.AmountOwed)

If Me.BondType = 1 Then
strBond = "Active"
Else
strBond = "Inactive"
End If

If Me.ChecksInTheMail = -1 Then
strChecks = "Yes"
Else
strChecks = "No"
End If

strMSG = ("Member: " & Me.Member) & _
vbCr & ("Company: " & Me.Company) & _
vbCr & ("Closed Date: " & Me.ClosedDate) & _
vbCr & ("Type: " & Me.Type) & _
vbCr & ("Amount Collected: " & curAmount) & _
vbCr & ("Bond: " & strBond) & _
vbCr & ("Number Of Complaints: " & Me.NumberOfComplaints) & _
vbCr & ("Checks In The Mail: " & strChecks)

Set objOutlook = GetObject(, "Outlook.Application")

DoCmd.SendObject , , , "(e-mail address removed)", , , "Close
Collection File", strMSG, No

DoCmd.Close
End Sub

The machine in question just freezes up when the submit button is clicked.
All other users (12) are not having any problems. Does anyone know what
could be the problem and how to fix it. Thanks
 
S

Scott McDaniel

I don't see any reason to use the Set objOutlook blah blah line ... The SendObject method of Access will fire up your
default mail client, so using both is somewhat redundant (and if that machine has a different default client, then you
may have some issues with trying to run both at the same time). Try commenting out the line and see if that solves the
trouble.
I have one user with problems and I believe it is related to her Outlook
application. The following is my code:

Private Sub cmdSubmit_Click()
Dim strMSG As String
Dim curAmount As Currency
Dim strBond As String
Dim strChecks As String

curAmount = Nz(Me.AmountOwed)

If Me.BondType = 1 Then
strBond = "Active"
Else
strBond = "Inactive"
End If

If Me.ChecksInTheMail = -1 Then
strChecks = "Yes"
Else
strChecks = "No"
End If

strMSG = ("Member: " & Me.Member) & _
vbCr & ("Company: " & Me.Company) & _
vbCr & ("Closed Date: " & Me.ClosedDate) & _
vbCr & ("Type: " & Me.Type) & _
vbCr & ("Amount Collected: " & curAmount) & _
vbCr & ("Bond: " & strBond) & _
vbCr & ("Number Of Complaints: " & Me.NumberOfComplaints) & _
vbCr & ("Checks In The Mail: " & strChecks)

Set objOutlook = GetObject(, "Outlook.Application")

DoCmd.SendObject , , , "(e-mail address removed)", , , "Close
Collection File", strMSG, No

DoCmd.Close
End Sub

The machine in question just freezes up when the submit button is clicked.
All other users (12) are not having any problems. Does anyone know what
could be the problem and how to fix it. Thanks

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
G

Guest

I only added the Set objOutlook line in when i read someone else's thread
regarding problems with outlook. The orginal code was without the Set
objOutlook and the user still had the problems. I am starting to believe is
has something to do with the Outlook application on that particular machine.
 
S

Scott McDaniel

I only added the Set objOutlook line in when i read someone else's thread
regarding problems with outlook. The orginal code was without the Set
objOutlook and the user still had the problems. I am starting to believe is
has something to do with the Outlook application on that particular machine.

That post was probably dealing with invalid references on the enduser machine, in which case using Late Binding (which
is what your codeline did) can solve some of those issues.

Regarding your original problem: What email client is being used? Have you verified that the machine can send and
receive email? Also make sure that machine is fully updated with all Windows/Office service packs in place.

Finally, if nothing else works, I'd try to track down the problem by the baby step method: build an application with one
form, which has one button that does this:

DoCmd.SendObject acSendNoObject

and have the user run that. If that seems to work, then try adding other items to that until such time as you run into a
problem. I've sent out small test apps with buttons numbered "1", "2", "3" etc and had the onsite user try each one in
succession and report back to me with a success/fail report on each. It's crude but effective, if you can narrow the
issue down to a few items.



Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
G

Guest

Thanks for helping me out.

Yes, the user in questions has other problems with Outlook. I have turned
in a request to our IT dept to take a look at it. From some articles I have
read regarding similar problems, most are just re-installing Office. If that
does not work, I will try your method of isolating the problem.
 

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