I have a table "ExpenseReports" that has data imported from Excel for multiple people, each with different customers.
I would like to create and print a separate query for each Employee with a separate page for each customer. So each of the following would be a separate sheet of paper: Page 1 - Employee1 & Customer 1; Page 2 - Employee1 & Customer2; etc.. In a dream world, I would like to then run an update query to mark is as printed so it doesn't show up when I run the next employee.
I am not all that great at VBA but I did attempt with a module looping through and then filtering based on that but it didn't work. Current Fields:
WeekDate, Customer, ExpType, CorpBooked, CurrencyMileage, Memo, WorkDays, Total, ResourceName, ImportDate, ExpenseID, QueryPrint
Here is the Module I attempted to make:
Public Sub OpenRecordset()
Dim i As Integer
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("qryExpenseReportsforPrint")
For i = 0 To rs.RecordCount - 1
Debug.Print rs.Fields("Customer")
rs.MoveNext
Next i
rs.Close
Set rs = Nothing
db.Close
End Sub
Any help would be greatly appreciated!!!!
Thank you!