i have some code (Below) that is on my main form, so i can print out individual jobs.
If i need to print out 10 jobs, i have to go into them all individually, and press the button. (I currently have to do this for 66 jobs outstanding)
I would like to do this by being able to select from a list box (I can set this up), so i can select the job numbers and print out all the jobs i need. (this is the bit i am struggling with.
what do i need to change in the code below to loop through all the jobs that i have selected in the listbox ?
If i need to print out 10 jobs, i have to go into them all individually, and press the button. (I currently have to do this for 66 jobs outstanding)
I would like to do this by being able to select from a list box (I can set this up), so i can select the job numbers and print out all the jobs i need. (this is the bit i am struggling with.
what do i need to change in the code below to loop through all the jobs that i have selected in the listbox ?
Code:
Private Sub btnPrint_Click()
If (Not chkJob) Then
MsgBox "Nothing Selected!", vbExclamation + vbOKOnly, "No Selection!"
Exit Sub
End If
Me.Visible = False
WaitOn "Creating Print Job . . ."
If chkJob Then
PrintReport "rptViewJob"
End If
DoCmd.Close acForm, "frmPrint"
Waitoff
End Sub