Form Option Group - Check Controls to Enable a Command Button

velcrowe

Registered User.
Local time
Today, 10:13
Joined
Apr 26, 2006
Messages
86
I created a form to print reports based on the values selected from a series of check boxes in my option group. I do not want the user to get an empty report so I only want the print command button enabled if the check box shows that is has been selected. Is this possible? I thought the code would look something like this

If me.Check123 = true them me.cmdprint.enabled = true elseif me.cmdprint.enabled = false.

It could be really simple but I greatly appreciate any help. Thank you :o
 
I created a form to print reports based on the values selected from a series of check boxes in my option group. I do not want the user to get an empty report so I only want the print command button enabled if the check box shows that is has been selected. Is this possible? I thought the code would look something like this

If me.Check123 = true them me.cmdprint.enabled = true elseif me.cmdprint.enabled = false.

It could be really simple but I greatly appreciate any help. Thank you :o

Since you are using an option group try something like this:
If Me.OptGrp1.Value = 1 then Me.cmdPrint.enabled = true

Basically, since you are using an option group, you need to use the option group as a whole and assign values to each check box. The you are going to use the option group value (like above) instead of each check box.
 
By default have the print button disabled when the form is opened. Then when the use clicks on the option group use the OnClick event to enable the print button.
 

Users who are viewing this thread

Back
Top Bottom