I want to create a report but allow users to filter the information in the report. It is my understanding that I can create my own SQL statement and then some how apply this as a filter to my query. The code I was looking at goes something like this:
'Create the sql statement. 'Description' is one of the fields I have in my query and cboIndustry is a combo box on my form.
SQL_statement = "Select * from MyQuery Where Industry.Description = " & cboIndustry.Text
DoCmd.OpenReport MyReport, acPrevies, SQL_Statement
This doesn't seem to be working. Any ideas? Thanks!
'Create the sql statement. 'Description' is one of the fields I have in my query and cboIndustry is a combo box on my form.
SQL_statement = "Select * from MyQuery Where Industry.Description = " & cboIndustry.Text
DoCmd.OpenReport MyReport, acPrevies, SQL_Statement
This doesn't seem to be working. Any ideas? Thanks!