-
Using DAO it is possible to search/update the contents of a DBGrid by linking the recordsource of a data control object to an unbound text box such as,
txtsearch on Change()
data1.RecordSource = "SELECT * FROM Customer WHERE Surname like " & """" & txtsearch.text & "*"""
bla bla etc etc
the DBGrid is of course is bound to Data1.
How is this method possible in ADO ?? I have tried different ways but get a message saying I can't change the source whilst the connection is open.
Can anybody help me ??
-
Instead of using the data controller for ADO I have been just setting the grid equal to a defined recordset.
Like this:
Set tempRcSet = ("Select * From [table]",dbConnect,....)
set grid.Datasource = temprcset
This seems to allow me to change the recordset or recordsource without an error.
Are You using the OLE Grid as well?? Because this may be causing your problem.
Hope this helps.