Hello i want to know a complete code of finding a correct answer of MCQs in VB 6 and if answer is true then it shows the answer in Green text box and if answer is false then it shows the answer in Red text box.
Kindly help me to do this..
i shall be very grateful..

Recommended Answers

All 8 Replies

You mean you have a set of questions and for each question there are 4 answers and out of which one has to be the correct answer. And also you have them saved in the database, right? Then you call the questions and the answers in front of the questions on to a VB6 Form. Let us suggest that there are 4 option buttons (being answers) for each question and when the operator or user selects an answer by clicking on the option button, a text box in front of that question becomes green or red according to the answer. In other words if the answer is correct the Text box will become Green and if it is wrong the Text Box will become Red in colour. If this is what you need to do, then it should be easy to accomplish this task.
You may go through the above chapter and let me know whether this is what you are expecting exactly or anything else. Besides, you have not mentioned any of your coding to peruse even.

You mean you want us to do all the work for you even though you have shown no proof that you have put any effort into it yourself?

Yes, I agree with Rev. Jim

working on it in a few

how to random question from ms access database to vb 6 . thanks

how to random question from ms access database to vb 6 . thanks

Dim connectStr = "data source=mydatasource;initial catalog=gcs_dw;persist security   info=True;user id=myuser;password=mypassword;Asynchronous Processing=True"
Dim Connection as SqlConnection = New SqlConnection(connectStr)
Dim Command As SqlCommand = Connection.CreateCommand()
Dim Count as Integer = Command.ExecuteNonQuery()
Dim randID as Integer = Int((Count * Rnd()) + 1)
Command.CommandText = "SELECT * FROM table1 WHERE id='" + randID + "'"
Dim randRow as SqlDataReader = Command.ExecuteReader()

plzzz help me..

fdis: Help you with what, learning not to hijack three-month-old threads without even asking a question? Gladly. If, on the other hand, you want help with a programming problem, you will need to start a new thread of your own, explain what you need help with in clear and standard English without using unnecessary abbreviations or textspeak, and demonstrate that you have made a good-faith effort to solve the problem on your own. Can you do that much?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.