Hello, I have a report that I need to be able to adjust the qty of the copies printed using a textbox on my form. I have the below code that works flawlessly for a set amount of copies. sometimes I will need to print 1 copy and sometimes I will need to print 2,3,4,5 etc. the text box on my form I need to reference to get the number of copies is named SkidCount What do I need to change in the code to reference the text box, and where do I need to place it?
Thanks in advance
Steve
Code:
Private Sub btnPrintHOTTAG_Click()
Const MESSAGETEXT = "No current record."
Dim strCriteria As String
strCriteria = "ID = " & Me.ID
If Not IsNull(Me.ID) Then
' ensure current record is saved
Me.Dirty = False
' open report in print preview
'DoCmd.OpenReport "rptHOT", _
WhereCondition:=strCriteria
DoCmd.OpenQuery "qryUpdateRecord", acViewNormal
DoCmd.OpenReport "rptHOT", acViewPreview, , strCriteria
DoCmd.PrintOut , , , , 3
DoCmd.Close
DoCmd.GoToRecord , , acNewRec
Else
MsgBox MESSAGETEXT, vbExclamation, "Invalid Operation"
End If
End Sub
Thanks in advance
Steve