iv been having a little trouble with a little code i have written in my MDB project.
all i want this to do is print a selected ammount of invoices, unfortunatley it keeps printing the first one out for each number selected, say i sellect 5 it will print the first invoice 5 times!
Heres my code:
Private Sub BtnListInvoice_Click()
Dim sql As String, sqld As String, sqlEx As String, sqls As String
sql = "AND (invoiceid =" & LstInvoice & ")"
For Each varitem In LstInvoice.ItemsSelected
DoCmd.OpenReport "rpt_acc_PUR_INVOICE_5", , , "invoiceid = " & LstInvoice.Column(0)
'PrintReport "rpt_acc_PUR_INVOICE_5", invoiceid = " & LstInvoice.Column(0)"