I am very new to Access, but I feel like this should be pretty easy. I am trying to create a form where I type in the item number (Currently using a combination box) and then another box auto populates my print quantity from the table that is based on the item number. Then I want to hit my Command button to print my report with the number of copies in the Print Quantity field.
I get a really quick flash of a popup box on my screen and then nothing happens. I am trying to use this code with my report:
Option Compare Database
Option Explicit
Dim intPrintCounter As Integer
Dim intNumberRepeats As Integer
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If intPrintCounter < intNumberRepeats Then
intPrintCounter = intPrintCounter + 1
Me.NextRecord = False
Else
intPrintCounter = 1
Me.NextRecord = True
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
intPrintCounter = 1
intNumberRepeats = Forms!Form1!#ofCards
End Sub
Thanks for the help!
agb
I get a really quick flash of a popup box on my screen and then nothing happens. I am trying to use this code with my report:
Option Compare Database
Option Explicit
Dim intPrintCounter As Integer
Dim intNumberRepeats As Integer
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If intPrintCounter < intNumberRepeats Then
intPrintCounter = intPrintCounter + 1
Me.NextRecord = False
Else
intPrintCounter = 1
Me.NextRecord = True
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
intPrintCounter = 1
intNumberRepeats = Forms!Form1!#ofCards
End Sub
Thanks for the help!
agb