|
-
Apr 8th, 2001, 04:55 PM
#1
Thread Starter
New Member
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
Gabriel McMillan
Email: [email protected]
HTML, Dreamweaver, VBScript
Visual Basic 6.0 SP6 Professional Edition, Palm OS 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|