Start New Discussion within our Software Development Community

I've fought the Error 91 problem for years programing (self taught) in VB 6. Below is a simple example of a program getting data from a database and putting it into a grid. I know I'm supposed to use Dim and Set statements, but I've never figured it out. Can you help me??

Private Sub FormLoad()

    R = 1: grdData.Col = 0

    Do Until Data1.Recordset.EOF = True
       grdData.Row = R
       grdData.Text = Data1.Recordset.Fields("Name")
       R = R + 1

End Sub