Creating labes report with 'TimesToRepeatRecord' criteria

adi2011

Registered User.
Local time
Today, 12:56
Joined
May 1, 2011
Messages
60
Hi,

in my database (db) I have first create simple report which can print label for certain article in number of times user wants to. That part of db is marked as OldLabels in db that I have attached bellow.

Now, I plan to update this code via form NewLabels so user could choose more than one article and for each article he can define 'TimesToRepeatRecord' number. Unfortunately, I am little confused how to achieve this.. This is the old code (from Report) which have done most of the work

Code:
Option Explicit
        Dim intPrintCounter As Integer
        Dim intNumberRepeats As Integer

Private Sub Report_Open(Cancel As Integer)
           intPrintCounter = 1
           intNumberRepeats = Forms!VPDEKLARACIJE!TimesToRepeatRecord
End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
           ' Note: intNumberRepeats and intPrintCounter are initialized
           ' in the report's OnOpen event.
           If intPrintCounter < intNumberRepeats Then
              intPrintCounter = intPrintCounter + 1
              ' Do not advance to the next record.
              Me.NextRecord = False
           Else
              ' Reset intPrintCounter and advance to next record.
              intPrintCounter = 1
              Me.NextRecord = True
           End If
        End Sub
I have also attached db named "Demo" so you could see the issue.

http://www.speedyshare.com/E2yq4/Demo.rar

Many thanks in advance for your suggestions!
Adi
 
Last edited:
Hi

Could you not have a small form where the user can enter which article(s) and the no of times to print and just loop the above code through each label to print them?
 

Users who are viewing this thread

Back
Top Bottom