复选框选择其他复选框 [英] Checkbox selects other Checkboxes

查看:96
本文介绍了复选框选择其他复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


[Access 2003]


我有一个质量保证数据库,其表格上有一堆复选框这就是为什么产品没有通过检验的理由。


这是因为用户可以选择单独的复选框来指明原因。我想知道怎么做的是在表格上放一个复选框或单选按钮,如果它被选中,将选中所有复选框。


当我添加一个复选到我的表单并尝试为其编写代码,控件没有值或已检查属性供我选择。是不是可以这样做?如果我使用一个单选按钮,我希望有一个全选和一个取消选择,如果可能的话。


我试过了根据我在网上找到的东西无效:

Hi everybody,

[Access 2003]

I have a quality assurance database that has a form with a bunch of checkboxes on it that serve as reasons for why a product didn''t pass inspection.

It''s a given that the users will be able to select individual checkboxes to indicate the reasons. What I would like to find out how to do is to put a checkbox or radio button on the form that will select all the checkboxes if it''s selected.

When I added a checkbox to my form and tried to write code for it, the control didn''t have a ''Value'' or ''Checked'' property for me to choose. Is it not possible to do this? If I use a radio button, I''d like to have one to ''Select All'' and one to ''Deselect'' if at all possible.

I tried the following to no avail based on something I found online:

展开 | 选择 | Wrap | 行号

推荐答案

展开 | 选择 | Wrap | 行号


嗨OldBirdMan,


这是我为全选复选框输入的代码。我不认为这很重要,但是复选框都在选项卡控件上。

Hi OldBirdMan,

Here''s the code I entered for my ''Select All'' checkbox. I don''t think it matters, but the checkboxes are all on a tab control.

展开 | 选择 | Wrap | 行号


嗨OB。很高兴再次见到你:)


假设OB在他的示例中显示的聪明的命名结构(所有CheckBox控件,只有CheckBox控件,启动chk)以及chkSelectAll& chkDeselectAll是唯一以最后三个字符All结尾的,然后以下代码应该有所帮助:
Hi OB. Good to see you around again :)

Assuming the clever naming structure that OB displays in his example (All CheckBox controls, and only CheckBox controls, start chk) and also that chkSelectAll & chkDeselectAll are the only ones ending in the last three characters "All", then the following code should help somewhat :
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


这篇关于复选框选择其他复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆