I setup a variable to pass data to the recordset to run the query. If I use the name in the query it works fine but if I use the variable it does not work.
I think it has to do with syntax but I'm not sure
can someone help me out with this.
This works
Recordset1.Source = "SELECT firstname FROM dbo.task WHERE firstname = 'Bob Smith'"
This does not work
'Recordset1.Source = "SELECT firstname FROM dbo.task WHERE firstname = '" & Recordset1__varstr & "'"
please help
I think it has to do with syntax but I'm not sure
can someone help me out with this.
This works
Recordset1.Source = "SELECT firstname FROM dbo.task WHERE firstname = 'Bob Smith'"
This does not work
'Recordset1.Source = "SELECT firstname FROM dbo.task WHERE firstname = '" & Recordset1__varstr & "'"
please help