J
Joanne
I have the following which runs on the click event of a command button in a
form. The SQL part of it doesn't run at all. If I place this code into a
query, it runs fine and i get the results I want. What is wrong? It doesn't
error out, the report is just blank!
Public Sub btnSearch_Click()
Dim strSQL As String
strSQL = "SELECT Citation, CaseName,[Parties-Appellant]" _
& "FROM tblPatentCaseInformation" _
& "WHERE [Parties-Appellant]='test'" _
& "ORDER BY CaseName"
DoCmd.Echo True
DoCmd.OpenReport "CaseInformation", acViewDesign, , , , strSQL
DoCmd.Close , , acSaveYes
DoCmd.OpenReport "CaseInformation", acViewPreview, , , , strSQL
DoCmd.Echo True
form. The SQL part of it doesn't run at all. If I place this code into a
query, it runs fine and i get the results I want. What is wrong? It doesn't
error out, the report is just blank!
Public Sub btnSearch_Click()
Dim strSQL As String
strSQL = "SELECT Citation, CaseName,[Parties-Appellant]" _
& "FROM tblPatentCaseInformation" _
& "WHERE [Parties-Appellant]='test'" _
& "ORDER BY CaseName"
DoCmd.Echo True
DoCmd.OpenReport "CaseInformation", acViewDesign, , , , strSQL
DoCmd.Close , , acSaveYes
DoCmd.OpenReport "CaseInformation", acViewPreview, , , , strSQL
DoCmd.Echo True