Hello everybody,

I am working on another program for class, this time I am wanting to display the first, next, previous, and last records in my textbox from a random access file that I am making to enter college names and dates founded. I have started with the first cmd buttom. Any input would be greatly appreciated!

~Prd-Monkey

Here's the code:

Dim recordNum As Integer


Private Sub AddCollege_Click()
'Write a record into the file COLLEGES.TXT
Dim college As collegeData
college.nom = txtCollege.Text
college.state = txtState.Text
college.yrFounded = Val(txtYear.Text)
recordNum = recordNum + 1
Put #1, recordNum, college
txtCollege.Text = ""
txtState.Text = ""
txtYear.Text = ""
txtCollege.SetFocus
End Sub
Private Sub cmdDone_click()
Close #1
End
End Sub


Private Sub First_Click()
'Display the first record in the textbox.
textcollege.Text = LBound(college)


End Sub

Private Sub form_load()
'create colleges.txt
Dim college As collegeData
Open "colleges.txt" For Random As #1 Len = Len(college)
End Sub