Click to See Complete Forum and Search --> : input sequential file


Drew
April 11th, 2001, 08:56 AM
I have this input sequential file. The number 8 is used to make buttons for each Question. I can't figure out how to input the answers into a array and compare them to the answer in the text box. The code I have so far just enters the questions into the label.

Data-types Quiz, 8
1, What data-type would you use for the population of Chicago?, LONG,LONG,lng,1
2, What data-type would you use for a Social Security number?, STRING,STRING,str,1
3, What data-type would you use for a variable where the only valid values are ON/OFF?, BOOLEAN,BOOLEAN,bln,1




Open g_strFileName for input as #intFileNum

input #intFileNum, strTestName, intNumberOfQuestions ', strAnswere1, strAnswere2, strAnswere3
'input #intFileNum, strAnswere1, strAnswere2, strAnswere3

me.Caption = strName & "'s " & strTestName

ReDim g_strQuestionsAndAnswers(1 to 7, 1 to intNumberOfQuestions) as string

for intLoadQuestions = 1 to intNumberOfQuestions
Call MakeTheButtons(intLoadQuestions)
for intLoadFields = 1 to 6
input #intFileNum, g_strQuestionsAndAnswers(intLoadFields, intLoadQuestions)
next intLoadFields
g_strQuestionsAndAnswers(intLoadFields, intLoadQuestions) = "<Enter you answer>"
next intLoadQuestions

Close #intFileNum

shree
April 11th, 2001, 09:12 AM
Look at my reply in

http://www.codeguru.com/cgi-bin/bbs/wt/showpost.pl?Board=vb&Number=48190&Search=true&Forum=vb&Words=&Match=Whole&Topic=&Searchpage=0&Limit=25

It might help you.