i'm currently doing a database about examination system.. i already have a database for login,registration, and questionaires.
my problem is on my question database.. i managed to connect the questions and choices in visual basic (or so i thought) questions are on multiple choices.. my question is : how can i put a value on the right answer. let's say, if the answer for a question is option 1 and the user chooses option two.. it should produce a "0" score.
Ensure that you have normalized your database fields and tables properly. You actually need (at least) two tables to store your multiple-choice questions: Questions and Answers. Questions will have the question number (primary key), title(optional), question text and the correct answer number(s). You could add other fields, but make sure they are related to the Question, and not an answer. The second table is for your answers, which will have the question number (foreign key), answer number, the answer text, and optionally other fields related to the questions. The question number and answer number together are the composite primary key.
When a user gives a response, compare the user's answer with the correct answer for the question. If they match, then add 1 to the score; otherwise don't.
If there is specific code that is giving you problems, please post it and we can give more specific advise.
i forgot to mention that i'm a beginner when it comes to database.I need to familiarize myself with terms like primary key, foreign key, return value, modules, classes and the like.I googled those terms and I'm learning byte by byte. Still have a long way before i master vb6 >.<
anyway, thank you for the reply!
my approach so far is this (w/o applying complicated code and based from my "logic"):
coding for form2:
Private Sub Command1_Click()
Label7.Caption = Label2.Caption
Private Sub Command2_Click()
Label7.Caption = Label3.Caption
Private Sub Command3_Click()
Label7.Caption = Label4.Caption
Private Sub Command4_Click()
Label7.Caption = Label5.Caption
Private Sub Command5_Click()
If Label7.Caption = Label6.Caption Then
Form3.Label1.Caption = Val(Form3.Label1.Caption) + 1
Private Sub Command6_Click()
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...