I believe I have a similar problem to this previous post:
http://www.access-programmers.co.uk/forums/showthread.php?t=68902&highlight=print
I currently have a form that has several subform pages. I have a PRINTALL Macro that does this:
GoToControl: Subform1
PrintOut: Selection
GoToControl: Subform2
PrintOut: Selection
etc....
I have it do that for 11 Subforms. My problem occurs when my main form has more than 20 records, it would have to print 11 forms for each records, so I'm assuming I'm running into the problem similar to the previous thread. I already converted the macro to VBA, but I am looking for the looping code to ensure that it prints all records in the main form VS. calling the macro again.
here is the VB code:
Function PrintAll()
On Error GoTo PrintAll_Err
DoCmd.Echo False, "Printing..."
DoCmd.GoToControl "General Directory Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Key Close Dates"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Responsible Depts"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Cover Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Front of Book Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "White Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Govt Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Yellow Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Misc Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Marketing Estimates"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToRecord , "", acPrevious
DoCmd.RunMacro "PrintAll", 1000, "" <-------THIS IS WHAT I WANT TO FIX
PrintAll_Exit:
Exit Function
PrintAll_Err:
MsgBox Error$
Resume PrintAll_Exit
End Function
Thanks for any input and help on this situation.
http://www.access-programmers.co.uk/forums/showthread.php?t=68902&highlight=print
I currently have a form that has several subform pages. I have a PRINTALL Macro that does this:
GoToControl: Subform1
PrintOut: Selection
GoToControl: Subform2
PrintOut: Selection
etc....
I have it do that for 11 Subforms. My problem occurs when my main form has more than 20 records, it would have to print 11 forms for each records, so I'm assuming I'm running into the problem similar to the previous thread. I already converted the macro to VBA, but I am looking for the looping code to ensure that it prints all records in the main form VS. calling the macro again.
here is the VB code:
Function PrintAll()
On Error GoTo PrintAll_Err
DoCmd.Echo False, "Printing..."
DoCmd.GoToControl "General Directory Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Key Close Dates"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Responsible Depts"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Cover Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Front of Book Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "White Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Govt Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Yellow Pages Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Misc Info"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToControl "Marketing Estimates"
DoCmd.PrintOut acSelection, , , acHigh, 1, True
DoCmd.GoToRecord , "", acPrevious
DoCmd.RunMacro "PrintAll", 1000, "" <-------THIS IS WHAT I WANT TO FIX
PrintAll_Exit:
Exit Function
PrintAll_Err:
MsgBox Error$
Resume PrintAll_Exit
End Function
Thanks for any input and help on this situation.