Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set DBGrid Datasource property?

Status
Not open for further replies.

jasonp45

Programmer
Aug 23, 2001
212
0
0
US
I know I've done this before, but I can't remember...how do I set the MSDBGrid control's datasource property?
 
Hi jasonp45!
If you're using the standard DBGrid control, you will find that the 'intrinsic data control' - the one that appears when you open a standard project - can be bound to the Grid. Obviously the data control should be on the form so it will appear as an option in the dropdown under DATASOURCE. Ado (OLEDB) controls will not work with DBGrid.
Hope this helps
Regards - Micash
 
dim rs As New ADODB.Recordset
Set rs.ActiveConnection = (u know here)
rs.Open " Select * from Custommers" 'Better don't do this
set myGrid.DataSource = rs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top