print quantity

  • Thread starter Thread starter Rpettis31
  • Start date Start date
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
 
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."
 
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.
 
Back
Top