How do I get Datagrid to work

  • Thread starter Thread starter Chris L. Park
  • Start date Start date
C

Chris L. Park

Hello
I am working on a form that contains a combo-box, a Option button group and
a data grid. Based on the information in the combo-box and the button
selected in the option group, I can create the proper Sql statement to get
the data. What I am having problem with is getting this data attached to the
datagrid? I do have the ADO Connection working to database.

I am using Access 2000
Microsoft Datagrid Control 5.0 (sp6)

TIA
Chris
 
Hi,


You should try a subform rather than a datagrid, if you are using
Access.

If you are using VB6, first, open a ADO recordset, rst, such that its
scope make it visible for all the form. then, use something like:

With Me.DataGrid1
Set .DataSource = rst
.ClearFields
.Rebinds
End With


Do not miss the dots. Be sure the recordset is "visible" anywhere under the
form, and that you can navigate through it (forward and backward).



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top