无法在Access中选择选项按钮 [英] Can't select option button in Access

查看:117
本文介绍了无法在Access中选择选项按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白为什么Access必须如此脾气暴躁!!


我有一个简单的选项组,其中包含两个选项按钮,带有值分别为1和2。在包含选项组的窗体的Form_Load事件上,组的默认值设置为1,如下所示:


Private Sub Form_Load ()


fraReportInterval.DefaultValue = 1


结束子


然后我有一个处理按钮点击事件的事件处理程序,根据选择的选项执行任务,类似于下面:


Private Sub cmdRun_Click()


选择案例fraReportInterval.Value

案例1
'如果选择了选项按钮1,则在此处执行操作
案例2
'如果选择了选项按钮2,则在此处执行操作

结束选择


结束子


现在问题:当我打开表单使用它,它不会让我选择第二个选项按钮。两个butttons都启用了,似乎没有其他属性设置会导致这种情况。我在另一个数据库中有这个确切的布局,工作正常,我甚至交叉检查了两者之间的所有属性,它们是相同的!我已经使用向导来创建选项组,我也通过从工具箱中拖动控件来创建自己,但它没有它!我很讨厌讨厌访问!!!


请帮助,因为它让我发疯了!


非常感谢!


解决方案

好的,我已经成功解决了上述所有挫折之后(对不起!)。


事实证明,有各种表单级属性,即允许过滤器,允许编辑,允许删除和允许添加,已设置为否。已将它们全部更改为是(默认),I现在可以选择选项组中的选项。


但是,如果有人遇到同样的问题,希望这个帖子可以将它们排序。


干杯!


I don't understand why Access has to be so temperamental and fiddly!!

I've got a simple option group, which contains two option buttons, with values of 1 and 2 respectively. On the Form_Load event of the form that contains the option group, the default value of the group is set to 1, per below:

Private Sub Form_Load()

  fraReportInterval.DefaultValue = 1

End Sub

I then have an event handler that handles the click event of a button, which performs tasks depending on which option is selected, similar to below:

Private Sub cmdRun_Click()

  Select Case fraReportInterval.Value
 
    Case 1
      'Perform stuff here if option button 1 is selected
    Case 2
      'Perform stuff here if option button 2 is selected
  
  End Select

End Sub

And now to the problem: When I open the form to use it, it will not let me select the second option button. Both butttons are enabled and there seems to be no other property setting that would cause this. I have this exact layout in another database, which works fine, and I've even cross checked all the properties between the two and they are identical! I've used the wizard to create the option group and I have also created myself by dragging controls from the toolbox, but it aint having it! I bl00dy hate Access!!!

Please help, because it's driving me mad!

Many thanks!

 

解决方案

Ok, I've managed to sort this out after all my frustration above (sorry about that!).

It turns out that there were various form level properties, namely Allow Filters, Allow Edits, Allow Deletions and Allow Additions, that were set to No. Having changed them all to Yes (Default), I can now select options within the options group.

Still, if anyone has the same problem, hopefully this thread can sort them out.

Cheers!


这篇关于无法在Access中选择选项按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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