print quantity

R

Rpettis31

I have a command button that prints a report based on a single record.
I would like the option to specify the number of copies I can print rather
then continuously pushing the button.

Here is my code.

Private Sub cmdHoldTag_Click()

Dim StrCriterion As String

StrCriterion = "[DMRID]=" & Me.DMRID

DoCmd.OpenReport "rptQualityHold", acNormal, , StrCriterion

Exit Sub

End Sub
 
A

Al Campagna

Rpettis31,
On my website (below) I have sample 97 and 2003 files called "Multiple
Duplicate Labels"
The concept would be the same for a report as for labels.

This allows the user to specify "How many copies?"
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
F

fredg

I have a command button that prints a report based on a single record.
I would like the option to specify the number of copies I can print rather
then continuously pushing the button.

Here is my code.

Private Sub cmdHoldTag_Click()

Dim StrCriterion As String

StrCriterion = "[DMRID]=" & Me.DMRID

DoCmd.OpenReport "rptQualityHold", acNormal, , StrCriterion

Exit Sub

End Sub

Here is one method.

Private Sub cmdHoldTag_Click()
Dim intHowMany As Integer
Dim intX As Integer
intHowMany = InputBox("How many copies?", , 1)
Dim StrCriterion As String
StrCriterion = "[DMRID]=" & Me.DMRID

If intHowMany > 0 Then
For intX = 1 To intHowMany
DoCmd.OpenReport "rptQualityHold", acNormal, , StrCriterion
Next intX
End If
End Sub

A better soluton would be to have an unbound control on the form. Then
simply refer to that control:

For intX = 1 to Me![ControlName]
no need of intHowMany.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

print command 3
SendObject Action Message 1
Command button plus message 2
Print Button Code 2
Syntax for number of copies to print? 1
Can't get report to print 5
Button Coding 1
Form Button won't print report 2

Top