Hey All,
I'm using a Form Designer (FormFlow99) to design a form. I'm using ADO to connect to an Oracle Database - that part is working just fine.
My issue is that I have a fixed number of textboxes drawn onto the form and a varying amout of records being returned. If there are less records being returned than textboxes on the form it errors:
Microsoft VBScript Runtime Error
Script out of Range: '[number:6]'
Here is the code after the connection and recordset have been established:
If Not objRecordset.EOF Then
objResultSet = objRecordset.GetRows()
End If
Set objRecordset = Nothing
txtSSN1.Value = (objResultSet(0,0))
txtSSN2.Value = (objResultSet(0,1))
txtSSN3.Value = (objResultSet(0,2))
txtSSN4.Value = (objResultSet(0,3))
txtSSN5.Value = (objResultSet(0,4))
txtSSN6.Value = (objResultSet(0,5))
txtSSN7.Value = (objResultSet(0,6))
I know that the connection and recordset are good becuse it will write all reords to the form, but if there are less records than textboxes it gives the error above.
Any siggestions would be breatly appreciated.
I'm using a Form Designer (FormFlow99) to design a form. I'm using ADO to connect to an Oracle Database - that part is working just fine.
My issue is that I have a fixed number of textboxes drawn onto the form and a varying amout of records being returned. If there are less records being returned than textboxes on the form it errors:
Microsoft VBScript Runtime Error
Script out of Range: '[number:6]'
Here is the code after the connection and recordset have been established:
If Not objRecordset.EOF Then
objResultSet = objRecordset.GetRows()
End If
Set objRecordset = Nothing
txtSSN1.Value = (objResultSet(0,0))
txtSSN2.Value = (objResultSet(0,1))
txtSSN3.Value = (objResultSet(0,2))
txtSSN4.Value = (objResultSet(0,3))
txtSSN5.Value = (objResultSet(0,4))
txtSSN6.Value = (objResultSet(0,5))
txtSSN7.Value = (objResultSet(0,6))
I know that the connection and recordset are good becuse it will write all reords to the form, but if there are less records than textboxes it gives the error above.
Any siggestions would be breatly appreciated.