I build a SELECT query. Now I want to populate my dbgrid based on the query results. How do I do this?
Printable View
I build a SELECT query. Now I want to populate my dbgrid based on the query results. How do I do this?
Thanks. My goal was to figure it out w/o usinig data control. So I used MSFlexGrid and populated the grid w/o using the data control. Works great.
Add a DB grid and data control to your form. Set the DATASOURCE property of the grid to the data control. Add this code where you want it:
All doneCode:Dim db As Database
Set db = DBEngine.OpenDatabase("Nwind.mdb")
Set Data1.Recordset = db.OpenRecordset("Select * from Customers")
db.close
set db = nothing
Tom