Code problem Help!

M

MikeB

This code is for a form button. Click the button and an email opens up and
places the information from entered fields in the email. Plus it enter the
email address in the To: and fills in the Subject: line.

This all worked fine in Access 2000, I have up-graded to Access 2003 and now
it does not work. All I get is the To: and Subject: lines filled out. The
body of email is now blank.

If anyone can tell me or show me what code I should change would be great.

The other question would be when the To: line is filled in it has the
mailto: then the email address. Is there a way to have just the email
address go into the To: line.

Thanks very much for the help,

MikeB
(e-mail address removed)

--------------------------------------------------------

Private Sub Command35_Click()
Dim strCompname As String
Dim strFirstname As String
Dim strLastname As String
Dim strAddress As String
Dim strCity As String
Dim strState As String
Dim strZip As String
Dim strCountry As String
Dim strWorkphone As String
Dim strEmail As String
Dim strUsername As String
Dim strPassword As String
Dim strComments As String
Dim strModel1 As String
Dim strSerial1 As String

strCompname = "Company Name: " & Nz([compname], "BLANK FIELD")
strFirstname = "First Name: " & Nz([firstname], "BLANK FIELD")
strLastname = "Last Name: " & Nz([lastname], "BLANK FIELD")
strAddress = "Address: " & Nz([address], "BLANK FIELD")
strCity = "City: " & Nz([city], "BLANK FIELD")
strState = "State: " & Nz([state], "BLANK FIELD")
strZip = "Zip: " & Nz([zip], "BLANK FIELD")
strCountry = "Country: " & Nz([country], "BLANK FIELD")
strWorkphone = "Work Phone: " & Nz([workphone], "BLANK FIELD")
strEmail = "Email Address: " & Nz(, "BLANK FIELD")
strUsername = "Requested User Name: " & Nz([UserName], "BLANK FIELD")
strPassword = "Requested Password: " & Nz([password], "BLANK FIELD")
strComments = "Comments: " & Nz([comments], "BLANK FIELD")
strModel1 = "Model: " & Nz([model1], "BLANK FIELD")
strSerial1 = "Serial Number: " & Nz([serial1], "BLANK FIELD")

DoCmd.SendObject acSendNoObject, , acFormatTXT, strEmail, , , "Link-Belt
Preferred Application", _
strCompname & vbCrLf & _
strFirstname & vbCrLf & _
strLastname & vbCrLf & _
strAddress & vbCrLf & _
strCity & vbCrLf & _
strState & vbCrLf & _
strZip & vbCrLf & _
strCountry & vbCrLf & _
strWorkphone & vbCrLf & _
strEmail & vbCrLf & _
strUsername & vbCrLf & _
strPassword & vbCrLf & _
strComments & vbCrLf & _
strModel1 & vbCrLf & _
strSerial1 & vbCrLf, True

End Sub
 

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