G
Guest
I have the following code which works fine on the first record. Subsequent
report shows the data on more and more pages. eg, the first record contains 2
pages with different data on each page. The second record show 4 pages with
all the same data, the third record shows 7 pages with all the same data, the
question is, what am I missing????
Private Sub SendEMailButton_Click()
On Error GoTo Err_SendEMailButton_Click
Dim stDocName As String
Dim StrTo As String
Dim StrSubject As String
StrTo = DLookup("[E_Mail_Address]", "[Tbl_Contact]", "[Contact]='" &
Forms![Frm_General_Enquiries]![ContactCombo95] & "'")
stDocName = "Rprt_Quote_By_E_Mail"
DoCmd.SendObject acReport, stDocName, To:=StrTo, Subject:="Our Quotation
Ref " & Me.Reference_No
Exit_SendEMailButton_Click:
Exit Sub
Err_SendEMailButton_Click:
MsgBox Err.Description
Resume Exit_SendEMailButton_Click
End Sub
report shows the data on more and more pages. eg, the first record contains 2
pages with different data on each page. The second record show 4 pages with
all the same data, the third record shows 7 pages with all the same data, the
question is, what am I missing????
Private Sub SendEMailButton_Click()
On Error GoTo Err_SendEMailButton_Click
Dim stDocName As String
Dim StrTo As String
Dim StrSubject As String
StrTo = DLookup("[E_Mail_Address]", "[Tbl_Contact]", "[Contact]='" &
Forms![Frm_General_Enquiries]![ContactCombo95] & "'")
stDocName = "Rprt_Quote_By_E_Mail"
DoCmd.SendObject acReport, stDocName, To:=StrTo, Subject:="Our Quotation
Ref " & Me.Reference_No
Exit_SendEMailButton_Click:
Exit Sub
Err_SendEMailButton_Click:
MsgBox Err.Description
Resume Exit_SendEMailButton_Click
End Sub