BlueOysterCult
Regular
- Joined
- Oct 3, 2003
- Messages
- 84
Hello All
The problem may lie elsewhere but I believe the array is not being filled - I get a value cannot be null error when I hit the "next" but on my form - the (obvious) next record to be displayed
Can someone see something?
Thanks
Rob
The problem may lie elsewhere but I believe the array is not being filled - I get a value cannot be null error when I hit the "next" but on my form - the (obvious) next record to be displayed
Can someone see something?
Code:
Private Sub LoadCDArray()
Dim intCDCount As Integer
' Open the file
Do Until EOF(gintCdFileNum)
If intCDCount / 10 = Int(intCDCount / 10) Then
ReDim Preserve CdArray(intCDCount + 10)
End If
' Load the data in a loop
Input(gintCdFileNum, CdArray(intCDCount).strArtist)
Input(gintCdFileNum, CdArray(intCDCount).strTitle)
Input(gintCdFileNum, CdArray(intCDCount).strYear)
Input(gintCdFileNum, CdArray(intCDCount).strCategory)
intCDCount += 1
Loop
ReDim Preserve CdArray(intCDCount - 1)
'' Close the file
'FileClose(gintCdFileNum)
End Sub
End Class
Thanks
Rob