With my code below, I am trying to filter the 1 report for each record set in the "Temp Table". The report is filtered from a query "Carrier Report".
I am currently receiving a "Run time 3075 - Syntax Error (missing operator) in query expression '([Carrier Report].[I#]=&rs)'. With the below line:
Any ideas what I am doing wrong???
Code:
Public Function OrgIDReports()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sqlStr As String
sqlStr = "SELECT * FROM [Temp Table]"
Set db = CurrentDb
Set rs = db.OpenRecordset(sqlStr)
rs.MoveFirst
Do While Not rs.EOF
DoCmd.OpenReport "I# Report", acViewNormal, , "[Carrier Report].[I#]= & rs"
rs.MoveNext
Loop
MsgBox ("End of Client Org IDs")
End Function
Code:
DoCmd.OpenReport "I# Report", acViewNormal, , "[Carrier Report].[I#]= & rs"
Comment