Unanswered: strSQL statement doesn't seem to be working
I am trying to view reports selected from a table. When I execute this command however, I get a run-time error '2103' The report name 'select report.[report name] from report where (((report.[in])=Yes));' you entered in either the property sheet or macro is misspelled or refers to report that doesn't exist. What am I doing wrong here?
Private Sub Command7_Click()
Dim dbs As Database
Dim strSQL As String
Dim rst As Recordset
Set dbs = CurrentDb()
strSQL = "SELECT Report.[Report Name] " & _
" FROM Report " & _
" WHERE (((Report.[In])=Yes));"
Set rst = dbs.OpenRecordset(strSQL)
DoCmd.OpenReport strSQL, acViewPreview