Hi guys, I have my application which will allow users to build a sql filter. Now in the database it will store the filter like this

so the field is "Filter" now the filter I've created it db.OpenRecordset("SELECT * FROM `Databases` WHERE `Agent` = " & "'" & Form1.Text1.Text & "'")


When a user clicks command 1 text2.text becomes "db.OpenRecordset("SELECT * FROM `Databases` WHERE `Agent` = " & "'" & Form1.Text1.Text & "'")"

and then when command 2 is clicked it connects to the database and Set rs = text2.text


but that don't work it comes up an error.

any ideas?

Thanks