Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO PRINT EACH RECORD ON NEW PG OF DATAREPORT

Status
Not open for further replies.

Hiccup

Programmer
Jan 15, 2003
266
US
My setup is VB6/Access2K. I have a DataGrid1 connected via ADODC1 to the Access2K Table. On the VB Form, I have the DataGrid1 and ADODC1 along with a Command Button.

When the Command Button is clicked, I would like each Record from the Access Table to print out on a VB DataReport I created, but I would like each Record to start on a new page of the DataReport.

My code for the Command Button for printing the DataReport is:

Private Sub Command10_Click(Index As Integer)
OpenReport1
End Sub
Private Sub OpenReport1()
Dim rpt As NewDepReport
Set rpt = New NewDepReport
rpt.Display Me.Adodc1.Recordset, vbModal
Set rpt = Nothing
End Sub

This code prints all of the Records just fine, but they're run together. Can someone tell me what I need to do to the code to make each Record start on a new page?

Thanks in advance!!
 
Hiccup,
Could you "insert" a "page break" on the detail of your report?

Just a thought
Scoty ::)

"Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
Scoty - That's the first thing I thought of, also. But I didn't see a "Page Break" property item in the properties of the DataReport.

Does anyone know how to setup this Page Break (through the DataReport properties or the Command Button code) for the Report so that each Record prints on a new page?

Help!!! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top