Print Report

G

Guest

I built a cmd buttom name"letter preview" in the FORMS [Accounts], when i
click the "letter preview" it will goes to a smaller form name "Print
Letter", it will shows the actual transactions that i like to preview report
then click OK it will goes to the report preview, i total have about 500
transactions. the problems is when i go into the report preview, it only show
that only report at transactionsID #87, i have no idea why, could someone
help me. here are the code:
Private Sub previewletter_Click()
On Error GoTo Err_PreviewLetter_Click
If Forms![Accounts]![Transactions
Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "There is no data for this report. Canceling report..."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "Letter", acPreview
End If

Exit_PreviewLetter_Click:
Exit Sub

Err_PreviewLetter_Click:
If Err <> 2501 Then
MsgBox Err.Description
End If
Resume Exit_PreviewLetter_Click
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