Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!



Report Preview and Print Differ

By re-portfolio ·
I have a form called Capital Calls associated with a table by the same name so as to gather certain info part of which is then mapped on to a report also called Capital Calls. A command button on the form contains the line DoCmd.OpenReport "Capital Calls",acViewPreview. The recordsource of the unbound Capital Calls report is set to a SQL string (after making a connection object that filters records from two additional tables) in the Report_Open procedure. The resulting recordset has only two records. All of this seems to work fine. In the Detail_Print sub I have the following code:

If Not rst.BOF And Not rst.EOF Then
Me.txtInvestor = rst!Name & " " & rst! Surname
Me.txtStreet1 = rst!Street1
Me.txtCity = rst!City
Me.txtCtry = rst!Country
Me.txtCallAmt = CCur(Forms("Capital Calls")!txtPct) * CCur(rst!TotCommit)
End If
When I press the command button that prompts the report, the preview shows me a two-page report with what appears to be correct data. However, when I actually print the report out all fields are set to data pertaining to the last record only.

Can anybody point what it is that I'm doing wrong or not doing? Thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums