Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2007, 10:15 PM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default correct and incorrect text boxes

hi there i have a problem i can't figure out im doing a project in access that is a math quiz and im trying to figure out how i can put two textboxes for "correct" and "incorrect". in my form i have three txtboxes:

1 - number1
2 - number2

i have made these two txtboxes be random numbers from a button i press named "next"

below the two txtboxes is the third txtbox for the answer i named "useranswer" this txtbox the user enters what he thinks is the correct answer and if it is the correct answer a msgbox pops up and tells the user 'correct' or incorrect, but i want to add two more txtboxes to keep track of how many the user gets right and how many they get wrong with a percentage of there answers does that make any sense the purpose of the whole thing is when the user presses the button named "next" a new set of random numbers appear and the user enters the answer in the useranswer box. anyway thats the problem i can't figure out. i've tried using the "iif" in the control source of the two txtboxes "correct' and "incorrect" but i do'nt get how that is done any suggestions.

diaz123
 
Old June 18th, 2007, 08:47 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Wow, can you post that in English?

What you want to do is create a non-editable text box with the status of the repsonse that the user can't see (set to Visible = No). When your message box pops up, add either correct or incorrect, or some value, to the hidden text box. Use ONE text box for both a correct and incorrect response, bound to a single field in your exam table (junction table).

Then create a query to do the calculations for you. For example, if you use Correct and Incorrect, create a query that counts the instances of correct and incorrect for the user and the test. You can use this to display a running total score on the exam form using the query and a subform.

Did that help? Did you learn to write on a cell phone? =)



mmcdonal
 
Old June 18th, 2007, 08:18 PM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well no! i didn't learn to write on a phone thats the only way i could explain it i guess i wasn't thinking how others would read it sorry, but any way i figured it out but thanks for the response anyway (mmcdonal)

diaz123





Similar Threads
Thread Thread Starter Forum Replies Last Post
Rich Text Boxes speedlearner Pro VB 6 2 July 2nd, 2006 09:02 AM
Rich Text Boxes speedlearner All Other Wrox Books 1 June 22nd, 2006 08:04 AM
Using integers with text boxes clojinted General .NET 1 February 19th, 2005 08:12 PM
HELP with text boxes on webpage rwheeleragco Javascript How-To 1 November 2nd, 2004 04:32 AM
Form Text Boxes mrideout BOOK: Beginning ASP.NET 1.0 8 September 3rd, 2004 12:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.