Increasing Pages

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
 
G

Guest

I'm very sorry chaps and ladies, I thoght the detail was alittle vaugue in my
request for help so I took a look at the query and sub reports with a view to
giving you some more information and found the problem in the query.

Please therefore ignor this request and sorry once again.
 

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