check boxes

jmathew

Board Regular
Joined
Nov 22, 2004
Messages
237
Can you assocaite a check box with a table? So when a person checks an item or item(s) on a form it is recorded in a table?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

mdmilner

Well-known Member
Joined
Apr 30, 2003
Messages
1,352
Sure - depends on what exactly you mean.
If you just want to put a check box into an individual record, you can add a True/False or Yes/No field to a table.

If it's a bound control that you're checking, it'll change just like a bound textbox holding a value in the same table would change.

I think you may be asking - can I use a check box to verify whether I'd like something moved to a table. And, yes, of course you can. You can use anything you like - a button, or any of the events that are triggerable on a form. This might seem a bit wierd, but you could use a mouseover event (when holding your mouse over a given text box) to trigger it too.

Each form as a set of events just like each individual control (textboxes, checkboxes, comboboxes) have ones that are unique to what type they might be. For example, after open a combobox which has a list of things to select, you pick one, you can use the _AfterUpdate event to have a code module that exists behind the form to do anything that vba code can do.

There are a variety of events, such as _Click, _DoubleClick, _BeforeUpdate, etc. To view this, open a form in design mode. Select a control (or add one) then right-click and look at the properties then the Event Tab. The names are mostly descriptive. A key programming skill is knowing which is the most appropriate to a given situation.

Mike
 

jmathew

Board Regular
Joined
Nov 22, 2004
Messages
237
Thank you. So I have a form which has a bunch of check boxes on it. If one or more of the check boxes are selected then I would like the values of those check boxes stored in the table. Do I use the control source of the properties in the check box?
 

mdmilner

Well-known Member
Joined
Apr 30, 2003
Messages
1,352
When you mention your check boxes - do you mean you have a few checkboxes and you'd like the currently selected record to have something done to it?

Or, do you mean that each record on your form has it's own check box.

Mike
 

jmathew

Board Regular
Joined
Nov 22, 2004
Messages
237
I have a form which has three questions on it. The first question has 11 check boxes under it and the user has to choose only one of them. When the check box is chosen it needs to reflect that in the table. I tried associating the check boxes with the field in the table that it corresponds to however I ran into a problem. The check boxes are all checked no matter which one you choose. How do you get them to act independently of one another?
 

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
If you have one question with more than one response, then use the Option Group control. You will have to put it on the form first, then put the check boxes inside the Option Group. To put the check boxes inside the Option Group AND have them associated with the Option Group (VERY IMPORTANT) follow these steps.
1. Place the Option Group on the form where you want it.
2. Select all the check boxes that you want to have associated with this Option Group.
3. Cut them into the Clipboard. (Menu option Edit/Cut or Ctrl/X)
4. Select the Option Group
5. Paste the information from the Clipboard (Menu option Edit/Paste or Ctrl/V).
Do these steps for each group of check boxes that are associated with a specific question. (I believe you said you have 3 questions.)
Now, each Option Group can be refered to as a question with it's possible answers. When you select any of the check boxes within a single Option Group, it will be the only check box selected. In other words, this is how to get the check boxes to act independently of one another. Each check box should have it's own Option Value (check that in Properties, Data tab). What ever OptionValue the selected check box has is what will be recorded in the table.
HTH.
 

Forum statistics

Threads
1,137,204
Messages
5,680,166
Members
419,887
Latest member
Vasokir

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top