hi friendz..,
im working on "feedback form analysis" project
the first main aim of my project is to store data submitted by the user from the feedback form in a text file which can be accessed randomly. For that.... i wrote the following code:
CODE:
Private Type feedbackdata
Laboratory(0 To 4) As Integer
Library(0 To 4) As Integer
Teaching(0 To 4) As Integer
OptLaboratory As Boolean
OptLibrary As Boolean
OptTeaching As Boolean
End Type
Dim Index As Integer
Dim recordnum As Integer
Private Sub cmdSubmit_click()
Dim feedback As feedbackdata
Open "C:\student.txt" For Random As #1 Len = Len(feedback)
For Index = 0 To 4
If optLaboratory(Index).Value = True Then
feedback.Laboratory(Index) = 1
Else: feedback.Laboratory(Index) = 0
Put #1, 1, feedback
Next Index
Exit For
End If
For Index = 0 To 4
If optLibrary(Index).Value = True Then
feedback.Library(Index) = 1
Else: feedback.Library(Index) = 0
Put #1, 1, feedback
Next Index
Exit For
End If
For Index = 0 To 4
If optTeaching(Index).Value = True Then
feedback.Teaching(Index) = 1
Else: feedback.Teaching(Index) = 0
Put #1, 1, feedback
Next Index
Exit For
End If
recordnum = recordnum + 1
Close #1
End Sub
Private Sub cmdReset_click()
Dim Index As Integer
For index = 0 to 4
optLaboratory(index).value = False
Next
For index = 0 to 4
optLibrary(index).value = False
Next
For index = 0 to 4
optTeaching(index).value = False
Next
End Sub
================
when i execute the above code....the compiler is giving the following error:
after for next expected
i dont know whats wrong...Could u please help..?
thank u in advance........................