The following codes works fine when I set the parameters of the WHERE clus, but if I try to pass a varible collected from within the previous code it goes wrong.
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=c:\MyDatabase\MyDatabase.mdb"
rs.CursorType = adOpenStatic
rs.Open "Select * From tblnewsletter Where [Newsletter] = np", cn
How do I correctly pass a variable into SQL and why is my way wrong?????