J
jollygreen_EMT
I am working on a database with forms and have created a report based on the
form to use for printing. My report has 4 tab controls since the printed
report needs to be 4 separate pages (and would be longer than 22 inches). I
have a command button on the form to use for printing the report. The code
for the command button is:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[CUSTOMER #] = " & Me.[CUSTOMER #]
DoCmd.OpenReport "Rent To Own Contract Report", acViewNormal, ,
strWhere
End If
End Sub
My problem is that only the first tab control prints using this code. I have
tried DoCmd.OpenReport "Rent To Own Contract
Report!InformationSheet",acViewNormal,,strWhere
but I get an error that I have either mispelled the report or there is not
report by that name. Information sheet is the name of one of the tab controls.
What I want is to print all 4 of the tab controls from the report when the
command button is clicked on the form.
Thank you for your help.
form to use for printing. My report has 4 tab controls since the printed
report needs to be 4 separate pages (and would be longer than 22 inches). I
have a command button on the form to use for printing the report. The code
for the command button is:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[CUSTOMER #] = " & Me.[CUSTOMER #]
DoCmd.OpenReport "Rent To Own Contract Report", acViewNormal, ,
strWhere
End If
End Sub
My problem is that only the first tab control prints using this code. I have
tried DoCmd.OpenReport "Rent To Own Contract
Report!InformationSheet",acViewNormal,,strWhere
but I get an error that I have either mispelled the report or there is not
report by that name. Information sheet is the name of one of the tab controls.
What I want is to print all 4 of the tab controls from the report when the
command button is clicked on the form.
Thank you for your help.