Click to See Complete Forum and Search --> : DBGrid
mecca
Jan 24th, 2000, 02:20 AM
I build a SELECT query. Now I want to populate my dbgrid based on the query results. How do I do this?
mecca
Jan 25th, 2000, 12:26 AM
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.
Clunietp
Jan 25th, 2000, 11:02 AM
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:
Dim db As Database
Set db = DBEngine.OpenDatabase("Nwind.mdb")
Set Data1.Recordset = db.OpenRecordset("Select * from Customers")
db.close
set db = nothing
All done
Tom
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.