|
-
Sep 20th, 2001, 12:25 AM
#1
Thread Starter
New Member
Quiz App that accepts more than 1 choice
Hi, i'm pretty new to VB and need help creating a Quiz application. I see a lot of quiz app that only accept 1 answer with the radial button, but i need a more advance one.
The quiz should be able to accept more than 1 choice using a checkbox. (example: a question with 2 or more answer)
also the questions and answers are in .txt. If you think using a database is more suitable. i wouldn't mind it either,but i prefer it being in .txt.
I desperately need your help. thanx!
if you also know of a good book on VB in building application like this. Please recommend it to me. Thanx.
Last edited by nunu; Sep 20th, 2001 at 09:38 AM.
-
Sep 20th, 2001, 12:31 AM
#2
Addicted Member
Use This Site as your book
If you want to answer a quiz with multiple choice, you should use a combobox. Put the control on your form, stick the answers in the combobox, then use a select case statement to check for the correct answer.
i.e.
Select Case cboAnswer.Text
Case "True"
msgbox "Your Answer is Correct!"
Case "False"
msgbox "LOSER!"
End Select
-
Sep 20th, 2001, 02:58 AM
#3
Hyperactive Member
So if I'm reading this correctly, the user can provide multiple answers (bit like one of those awful date-match questionaires... "I like pubs and swimming and reading and gardening" sort of things)
You're on the right track with check boxes.
(Presumably then there aren't any right or wrong answers?)
I would suggest using a control array of checkboxes and a command button. Maybe something like this?
VB Code:
Private sub Command1_Click()
For i=1 to check1.Count
If check1(i).Value = 1 then
---
Else
---
End If
Next i
End Sub
I can't really offer any more advice at this time as you haven't said much about how it will work.
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
|