1,105,625 Community Members

Error 91

Member Avatar
DickEM
Newbie Poster
2 posts since Jun 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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()

    Data1.Recordset.MoveFirst
    R = 1: grdData.Col = 0

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

End Sub
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article