I would like to loop through a list of customers that have revenue changed from last month. I have the query that gives me the name of the customers but I am not sure how to create the loop as I am not very good at programming. I think you do a loop through a recordset.
I was thinking of trying something like this
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("q_Invoicing_ATest") 'This is my query
With rs
Do While Not .EOF
DoCmd.OpenReport "BOMI_Report", acViewPreview, , "CustomerId = " & Me.CustomerID - not sure what to do with this part
.MoveNext
Loop
End With
rs.Close
Set rs = Nothing
The problem is I am not sure if that where clause will work since it will just be a query and not coming from a form. I am kind of shooting in the dark here and any help would be appreciated.