473,806 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

check boxes

lee123
556 Contributor
how do you use a check box in a form, lets say you have a question (that needs to be answered) on a form and you have three check boxes and one is the right answer and two is wrong answer. if they pick one and its not the right answer. how would you make it so they couldn't change there answer. another words is if they pick the wrong answer the answer would stay checked and they couldn't check any other one to change there answer and be forced to go to the next question.
Jun 9 '07 #1
16 2220
maxamis4
295 Recognized Expert Contributor
For these kinds of things what you do is use the command button to finialize their answer. Once the table has a value inside the field it is referencing with the text box you lock the control and set the enabled property to disabled.
Jun 9 '07 #2
MSeda
159 Recognized Expert New Member
Firstly, you'll want to use an option group rather than just a regular check box. An option group is a frame that contain several controls(like checkboxes) that each have a unique value a user may select only on option in a frame at a time. The frame itself is what is bound to and passes the value to the table.
That said if you want the user to be forced to move to the next question you use the afterupdate event of the frame to either close the form and open the next form or move the focus to the next question on the same form and lock the frame.
Jun 9 '07 #3
lee123
556 Contributor
is there a code that goes behind the option box or the check boxes?
Jun 9 '07 #4
lee123
556 Contributor
ok i figured it out but know i have in the footer of the form two txtboxes named correct and another one named incorrect whats the code for this ...i mean how do i use the count function for these two txtboxes to count the correct and the incorrect is there a way to put this in vba or in the txtbox itself
Jun 10 '07 #5
NeoPa
32,579 Recognized Expert Moderator MVP
You need to share with us which controls (with names) are on your form. From there we could put in a formula which will count your results.
Jun 11 '07 #6
lee123
556 Contributor
On the form i have three checkboxes and a button:

Names:

Question 1

1 - CheckA
2 - CheckB
3 - CheckC


Question 2:

1 - Cb1
2 - Cb2
3 - Cb3

And a button

Question 3


1 - Checkbox1
2 - Checkbox2
3 - Checkbox3

And a button

And a button called:

1 - CheckAnswerButt on

In the footer of the form i have two text boxes:


1 - Correct
2 - Incorrect

I want to be able to have the correct answers to be put in the "Correct" box and the "Incorrect" be put in the "Incorrectb ox"

Thanks
Lee123
Jun 12 '07 #7
NeoPa
32,579 Recognized Expert Moderator MVP
What do all the buttons do?
How am I supposed to know which CheckBoxes (you should really be using Frames with RadioButtons by the way) represent a correct answer?

Please make the effort to read your post before submitting it. It is much easier to deal with questions when they make proper sense.
Jun 12 '07 #8
lee123
556 Contributor
ok the user has a question that he has to answer, underneath the question there are three check boxes (answers), one is the correct answer and two are the wrong answer.
all the checkboxes have a msgbox that pops up and tells the user if it's "correct" or "incorrect" for example :

(question) what's 20 + 20 =

checkbox1(15) or checkbox2 (25) or checkbox3 (40)

the user would check (checkbox3(40) ) and click a button named 'answerbutton" to check his answer

in this case the correct answer is (40) a msgbox would popup and have "correct"
but if they didn't know that it was forty and they chose (25) a msgbox would appear and say: "incorrect! "

there is going to be several questions on a form like this


then in the footer of the form there are two textboxes one is a txtbox (correct) and the other is (incorrect) if there is a way to count how many times they get an answer "correct" or "incorrect" that would be cool but if there isn't then i'll have to try something else

thanks
lee123
Jun 12 '07 #9
lee123
556 Contributor
oh by the way the check boxes are single ones>
Jun 12 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3608
by: Mohammed Mazid | last post by:
Hi folks! Can anyone please help me with this? I am developing a Quiz program but I am stuck with "multiple answers". Basically I need some sort of code that would select multiple answers using check boxes. For example, a question such as
2
2440
by: Edward | last post by:
The following html / javascript code produces a simple form with check boxes. There is also a checkbox that 'checks all' form checkboxes hotmail style: <html> <head> <title></title> </head> <body> <form name="myform" action=test.php method=post>
2
5269
by: Ben | last post by:
My current project requires me to create part of a form that is created on the fly. The project consists a list of entries to an event. The name and address and such is easy. The design is detup so that the creater of the even can make their own event in the database. When they do so a 2 tables are created. One for the entries such as names and the other is for the parameters of each event. The creator then goes in and makes each event...
0
1971
by: Robert | last post by:
Stephen, I think I figured out the problem. I was able to get Check Boxes and Option Buttons to work on my form by TURNING OFF RECORD SELECTORS on the form. Not sure why this would make a difference. Perhaps Access attributes the hWnd of the form to the Record Selector if these are turned on. In any case, I ran some tests on your Customers form and sure enough, a Check Box or Option Button will work fine until you turn on Record...
11
11973
by: Darryl Kerkeslager | last post by:
I wanted to test for only one True value in a bunch of checkboxes, so I figured I could just test for a value of exactly -1 after adding the values. In case 0 below, it worked. But in all other cases, it failed, with a Type error. Come to find out, sometimes, for no *apparent* reason - "True" is returned, at other times, -1. Can someone explain this (seemingly) random behavior, and tell me a way to force the integer result?...
2
1918
by: muthu | last post by:
Hi freinds, In my aspx page i have generated some check boxes dynamically using dhtml. When i check any check box and submit the form,how can i capture the value of check box. How should i identify wich check box is been checked.And the check boxes are not server controls.They are the ordinary html check boxes.Can any one help me out
2
1743
by: cpptutor2000 | last post by:
Could some PHP guru please help me? I have very standard PHP - MySQL application that reads in some data from a table and for each row, puts a check box at the start of the row. Now the check boxes are variable in number, depending only on the number of current records in the database table. My question is: how do I count the number of check boxes rendered at any one time. I tried having a global variable and incrementing it each time a...
1
1627
by: Java Kumar | last post by:
Hi Friends, I have a form which contains elements such as check boxes,text box,text area ., Problem is in Check boxes. By default, Check boxes are unchecked and text boxes are blank. I clicked one check box and entered some values in text boxes. then After a page refresh, the values of text boxes are cleared.But the check box is appears with check mark. the default value (unchecked) is not restored... Why ? How can i...
4
1516
by: wish | last post by:
Dear all; I have a lot of check boxes in the page..if the the user keep check the check boxes rather then check one check box for all check boxes will checked.. May i have ur help to refer? Thanks.
2
1931
by: KMEscherich | last post by:
Microsoft Access 2003 Hi there, am stuck with something that I am not sure on how to get done. I am attempting to have 3 check boxes and have 3 date fields. I need to have each date field be populated with an independent date when the end-user clicks on each of the 3 check boxes. CB_STARTED STARTED_DATE CB_COMPLETED COMPLETED_DATE
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.