PeopleSoft Adoption Made Smooth & Simple!
On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool. Claim Your Free WalkMe Account Now
Private Sub BtnLabel_Click() Dim stDocName As String Dim MyInv As Long, MyVar As Variant Dim NumCopies, i On Error GoTo Err_Btn1_Click stDocName = "ShipLabel3x5" MyInv = Me.InvoiceID MyVar = InputBox("How many labels to print?", "Label Counter", "1") If Nz(MyVar, "") = "" Then 'cancel Exit Sub Else NumCopies = MyVar End If 'just this invoice DoCmd.OpenReport stDocName, acViewPreview, , "InvoiceID=" & MyInv For i = 1 To NumCopies DoCmd.PrintOut Next i DoCmd.Close acReport, stDocName Exit Sub Exit_Btn1_Click: Exit Sub Err_Btn1_Click: If Err.Number <> 2501 Then MsgBox "Error #" & Str(Err.Number) & vbNewLine & "An error has occurred." & vbNewLine & "Description:" & vbNewLine & ErrDesc Resume Exit_Btn1_Click End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|MS Access 2013 - Multi-selection of records conforming to multiple criteria in different uncontrolled fields||5||30|
|Outlook VBA question - How do I mark a message as read||2||59|
|How to get data off Lotus Notes server||4||70|
Join the community of 500,000 technology professionals and ask your questions.