Hi,
Hope someone can point me in the right direction. having trouble coding.
Have a text box on a form (txtNoLabels) that determines the no of copies of a report to print. The problem is I cannot get the report to print out the number of desired times using DoCmd.PrintOut
Even if I replace txtNoLabel with a numeric value it doesn't print the desired number of pages. Have tried different permutations/arguments of DoCmd.PrintOut, declaring variables etc etc.
I can't figure out what I am missing. Below are some permutations I tried.
Can anyone se where I am falling down? Thanks in advance.
Poco
Hope someone can point me in the right direction. having trouble coding.
Have a text box on a form (txtNoLabels) that determines the no of copies of a report to print. The problem is I cannot get the report to print out the number of desired times using DoCmd.PrintOut
Even if I replace txtNoLabel with a numeric value it doesn't print the desired number of pages. Have tried different permutations/arguments of DoCmd.PrintOut, declaring variables etc etc.
I can't figure out what I am missing. Below are some permutations I tried.
Code:
DoCmd.OpenReport "rptLabel", acViewPreview, "", "", acNormal
MsgBox ("Label Qty " & txtNoLabel), vbInformation
'DoCmd.PrintOut , , , , txtNoLabel
'DoCmd.PrintOut acPrintAll, , , , txtNoLabel
'DoCmd.PrintOut acPages, , , , Me.txtNoLabel
'DoCmd.PrintOut acPrintAll, , , , intCopies
'DoCmd.PrintOut acPrintAll, , , , copies:=intCopies
'DoCmd.PrintOut , , , , 2
DoCmd.PrintOut , , , , [Forms]![frmLabel]![txtNoLabel].Value
Can anyone se where I am falling down? Thanks in advance.
Poco