Access 2003 - Codes does not work now - Help

M

MikeB

I have created a button to send emails. The button open a new email window
then pulls information from the table and inserts it into the email. This
worked fine in Access 2000. I just up-graded to Access 2003 in Office and
now the following code will not work. All I get is the To: to fill in and
the Subject to fill-in, all the data that is to go into the email body does
not, just blank.

Any ideas on what has changed in Access 2003? This may not be the best
way but it works, if someone has a better way to doing the same thing I
would love to see it.

Thanks for the help.

Mike B.



Access 2000 code
-----------------------

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

Similar Threads


Top