R
robert
Here is my script:
Dim email As String
email = Me.emailADDRESS
Dim contactID As String
Dim cnn As ADODB.Connection
Dim rst1 As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rst1.Open "member_QRY", cnn, adOpenKeyset, adLockOptimistic
Do Until rst1.EOF
contactID = rst1![contactID]
rst1.MoveNext
Loop
rst1.Close
Dim body As String
body = "Dear " & Me.firstNAME & ","
body = body & vbCr & vbLf & vbCr & vbLf & "ILTA has received your
membership dues payment. Please verify the information below and send
any changes or updates to (e-mail address removed)"
body = body & vbCr & vbLf & vbCr & vbLf
body = body & "Regards," & vbCr & vbLf
body = body & "Robert " & vbCr & vbLf
body = body & "Account Manager" & vbCr & vbLf
body = body & "Contact Information:" & vbCr & vbLf
body = body & Me.firstNAME & " " & Me.lastNAME & vbCr & vbLf
body = body & Me.address1 & vbCr & vbLf
body = body & Me.address2 & vbCr & vbLf
body = body & Me.address3 & vbCr & vbLf
body = body & Me.cityNAME & " " & Me.stateNAME & " " &
Me.zipPOSTAL & " " & Me.countryNAME & vbCr & vbLf & vbCr & vbLf
body = body & "Phone: " & Me.workPHONE & vbCr & vbLf
body = body & "Email: " & Me.emailADDRESS & vbCr & vbLf & vbCr &
vbLf
body = body & Me.memberTYPE & " Membership Valid Through: " &
dateEXP & vbCr & vbLf
body = body & " Amount Paid: " & amountPAID & vbCr & vbLf ***Here
is the error*****
DoCmd.SendObject acSendNoObject, , , email, , , "A message from
the Business Office", body, True
End Sub
Issue:
The query pulls from 2 tables contact_TBL and payment_TBL, the
'amountPAID' column is in the payment table, everything else in the
script/email above comes from the contact_TBL, the email works when
you try to send it but the last line is just blank it says:
.....Regluar membershp valid through 1/1/07
Amount Paid:
....
And thats it it is just blank, I cannot figure out how to tell access
to pull the information from the payment_TBL (amountPAID)
Any suggestions? Thanks in advance.
Dim email As String
email = Me.emailADDRESS
Dim contactID As String
Dim cnn As ADODB.Connection
Dim rst1 As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rst1.Open "member_QRY", cnn, adOpenKeyset, adLockOptimistic
Do Until rst1.EOF
contactID = rst1![contactID]
rst1.MoveNext
Loop
rst1.Close
Dim body As String
body = "Dear " & Me.firstNAME & ","
body = body & vbCr & vbLf & vbCr & vbLf & "ILTA has received your
membership dues payment. Please verify the information below and send
any changes or updates to (e-mail address removed)"
body = body & vbCr & vbLf & vbCr & vbLf
body = body & "Regards," & vbCr & vbLf
body = body & "Robert " & vbCr & vbLf
body = body & "Account Manager" & vbCr & vbLf
body = body & "Contact Information:" & vbCr & vbLf
body = body & Me.firstNAME & " " & Me.lastNAME & vbCr & vbLf
body = body & Me.address1 & vbCr & vbLf
body = body & Me.address2 & vbCr & vbLf
body = body & Me.address3 & vbCr & vbLf
body = body & Me.cityNAME & " " & Me.stateNAME & " " &
Me.zipPOSTAL & " " & Me.countryNAME & vbCr & vbLf & vbCr & vbLf
body = body & "Phone: " & Me.workPHONE & vbCr & vbLf
body = body & "Email: " & Me.emailADDRESS & vbCr & vbLf & vbCr &
vbLf
body = body & Me.memberTYPE & " Membership Valid Through: " &
dateEXP & vbCr & vbLf
body = body & " Amount Paid: " & amountPAID & vbCr & vbLf ***Here
is the error*****
DoCmd.SendObject acSendNoObject, , , email, , , "A message from
the Business Office", body, True
End Sub
Issue:
The query pulls from 2 tables contact_TBL and payment_TBL, the
'amountPAID' column is in the payment table, everything else in the
script/email above comes from the contact_TBL, the email works when
you try to send it but the last line is just blank it says:
.....Regluar membershp valid through 1/1/07
Amount Paid:
....
And thats it it is just blank, I cannot figure out how to tell access
to pull the information from the payment_TBL (amountPAID)
Any suggestions? Thanks in advance.