J
Jen
Hello.
I have a combobox on a form from where users can choose to print copies of a
report (how many copies, 0-4). Works ok, code for the commandbutton for
printing the report(s) is further below.
My question is how can I print a different text in a textbox or label in the
reports footer based on which copy it is.
For instance, first copy nothing, second copy "Own copy", third copy
"accounting" and so on? If the amount of copies would be always the same I
guess I could do this but now as the user get's to select the amount of
copies I don't know how to do it. Jen.
Private Sub utskrift_Click()
On Error GoTo Err_utskrift_Click
Dim stDocName As String
stDocName = "Faktura"
DoCmd.OpenReport stDocName, acPreview, "",
"[fakturanr]=[Forms]![fakturainmatning]![fakturanr]"
DoCmd.PrintOut , , , , Me!kopiaval, -1
DoCmd.Close acReport, stDocName, acSaveNo
Exit_utskrift_Click:
Exit Sub
Err_utskrift_Click:
MsgBox err.Description
Resume Exit_utskrift_Click
End Sub
I have a combobox on a form from where users can choose to print copies of a
report (how many copies, 0-4). Works ok, code for the commandbutton for
printing the report(s) is further below.
My question is how can I print a different text in a textbox or label in the
reports footer based on which copy it is.
For instance, first copy nothing, second copy "Own copy", third copy
"accounting" and so on? If the amount of copies would be always the same I
guess I could do this but now as the user get's to select the amount of
copies I don't know how to do it. Jen.
Private Sub utskrift_Click()
On Error GoTo Err_utskrift_Click
Dim stDocName As String
stDocName = "Faktura"
DoCmd.OpenReport stDocName, acPreview, "",
"[fakturanr]=[Forms]![fakturainmatning]![fakturanr]"
DoCmd.PrintOut , , , , Me!kopiaval, -1
DoCmd.Close acReport, stDocName, acSaveNo
Exit_utskrift_Click:
Exit Sub
Err_utskrift_Click:
MsgBox err.Description
Resume Exit_utskrift_Click
End Sub