Multiple check boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list of multiple check boxes on a form, how do I make to where only
one check box can be checked?
 
Hi -

I suggest that you use a radio button option group. This allows only one
option to be selected at a time.

John
 
I successfully got the option groups working, Thank you. Now when I click on
a individual button I need a message box to appear. I noticed in the
properties it didn't have the onclick event. How do I connect a macro to the
button to display a messagebox when it's clicked when the event onlclick is
not available?
 
The easiest way is to use the After Update event of the option group itself.
Clicking any of the buttons in the option group will trigger that event, and
you can check which button was clicked by checking the "value" of the option
group: If me![yourOptionGroup] = somevalue then.....

I myself use VB code to display messages, rather than macros. This might be
the best option on your case, especially if the message to be displayed is
different for each button.

John





I successfully got the option groups working, Thank you. Now when I click on
a individual button I need a message box to appear. I noticed in the
properties it didn't have the onclick event. How do I connect a macro to the
button to display a messagebox when it's clicked when the event onlclick is
not available?
[quoted text clipped - 5 lines]
 
ok say my option groups name is MaintenanceTables and the first radio button
is called Clauses and has the value of 1. When you click that button I want
the message to state "Please get the compliance Manager's Approval". May I
have a sample of how the code would be written?

J_Goddard via AccessMonster.com said:
The easiest way is to use the After Update event of the option group itself.
Clicking any of the buttons in the option group will trigger that event, and
you can check which button was clicked by checking the "value" of the option
group: If me![yourOptionGroup] = somevalue then.....

I myself use VB code to display messages, rather than macros. This might be
the best option on your case, especially if the message to be displayed is
different for each button.

John





I successfully got the option groups working, Thank you. Now when I click on
a individual button I need a message box to appear. I noticed in the
properties it didn't have the onclick event. How do I connect a macro to the
button to display a messagebox when it's clicked when the event onlclick is
not available?
[quoted text clipped - 5 lines]
I have a list of multiple check boxes on a form, how do I make to where only
one check box can be checked?
 
In the After Update event of the Option group you could have something like
this:

Select case me![maintenancetables]
case 1
msgbox "Please get the compliance Manager's Approval
case 2
msgbox ....
'etc for other values
end select

or, you can use if - then - elseif - endif :

If me![maintenancetables] = 1 then
msgbox "Please get the compliance Manager's Approval
elseif me![maintenancetables] = 2 then
msgbox ....
elseif....

endif

They're both the same, really - whichever you use is a matter of personal
preference.

John



ok say my option groups name is MaintenanceTables and the first radio button
is called Clauses and has the value of 1. When you click that button I want
the message to state "Please get the compliance Manager's Approval". May I
have a sample of how the code would be written?
The easiest way is to use the After Update event of the option group itself.
Clicking any of the buttons in the option group will trigger that event, and
[quoted text clipped - 18 lines]
 
Back
Top