hello good people,
i have a report that is meant to print out a label with information on a form.
In my form, i have a "Save, Print, Exit" button. in short, this button prints out info from my form.
i have a query feeding information to the report with what it is supposed to pring out.
i dont want a label for every record, only for the one just entered.
here is my VBA code:
ps. my Save Print Exit button calls the PrintLabels func.
Private Function PrintLabels()
Dim Show_Box As Boolean
Dim Response As Variant
Dim i As Integer
' Set the Show_Dialog variable to True.
Show_Box = True
' Begin While loop.
While Show_Box = True
' Show the input box.
Response = InputBox("Enter the number of labels to print or press Cancel to skip printing.", "Label Printing", 1)
' See if Cancel was pressed.
If Response = "" Then
' If Cancel was pressed,
' break out of the loop.
Show_Box = False
Else
' Test Entry to find out if it is numeric.
If IsNumeric(Response) = True Then
For i = 1 To Response
DoCmd.OpenReport "rpt_dicing_label", acViewNormal, , "[ID]=" & Me.ID
Next i
Show_Box = False
Else
' If the entry was wrong, show an error message.
MsgBox "Please Enter Numbers Only"
End If
End If
' End the While loop.
Wend
End Function
HELLLLLPP!!?!?!??!???