How do i fix Run Time Error 94 in Visual Basic 6?

Whenever I run my Program "Invalid Use of Null" occurs. Here is the code. I have also made a module. Private Sub Form_Load() Set Conn1 = New ADODB.Connection Call OpenDB sSQL = "SELECT DISTINCT Name FROM Authors" Set Rs1 = New ADODB.Recordset Rs1.Open sSQL,... show more Whenever I run my Program "Invalid Use of Null" occurs.

Here is the code. I have also made a module.

Private Sub Form_Load()
Set Conn1 = New ADODB.Connection
Call OpenDB

sSQL = "SELECT DISTINCT Name FROM Authors"
Set Rs1 = New ADODB.Recordset
Rs1.Open sSQL, Conn1, adOpenDynamic, adLockOptimistic, adCmdText

List1.Clear
Rs1.MoveFirst
Do Until Rs1.EOF
List1.AddItem Rs1.Fields(0) ---> this is the problem
Rs1.MoveNext
Loop
End Sub
2 answers 2