T
toleafs via AccessMonster.com
Hello,
I have a form with unbound text boxes for the users to enter parameters, and
then click a commad button which prints off pages from Reprot1 and the
Report2.
The issue is that the code below runs OK but it prompts for the unbound
textboxes for the 2 reports.
Is there a way to eliminate the prompts? ANY HLEP is greatle appreciated.
Dim numcopies As String
numcopies = InputBox("Enter number of copies")
If IsNumeric(CInt(numcopies)) = False Then
MsgBox "Not a number"
Exit Sub
End If
DoCmd.Echo False
Dim stDocName As String
stDocName = "rptL2005_02"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut acPages, 1, 2, , CInt(numcopies)
stDocName = "rptT2005_05"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut acPages, 1, 1, , CInt(numcopies)
I have a form with unbound text boxes for the users to enter parameters, and
then click a commad button which prints off pages from Reprot1 and the
Report2.
The issue is that the code below runs OK but it prompts for the unbound
textboxes for the 2 reports.
Is there a way to eliminate the prompts? ANY HLEP is greatle appreciated.
Dim numcopies As String
numcopies = InputBox("Enter number of copies")
If IsNumeric(CInt(numcopies)) = False Then
MsgBox "Not a number"
Exit Sub
End If
DoCmd.Echo False
Dim stDocName As String
stDocName = "rptL2005_02"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut acPages, 1, 2, , CInt(numcopies)
stDocName = "rptT2005_05"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut acPages, 1, 1, , CInt(numcopies)