setting enabled property

T

talib

Hello Access Nation

If possible can someone help me with this problem. I
have and option group with 6 buttons. The choices are
negative, positive, dillute, leaked, damaged in transit,
etc. If the positive option is selected then the user
can select 9 substances each having a checkbox. I want
to set the checkboxs' enabled property to false and if
positive is selected have the enabled property set to
true for the checkboxes. This will prevent the user from
checking a substance if there isn't a positive resuls.
Any and all help is appreciated. Thanks
 
L

Lynn Trapp

Put code like the following in the OnCurrent event of the form AND in the
click event of the option button for positive.

Me.YourCheckBox.Enabled = Me.YourOptionButton
 
T

Talib

-----Original Message-----
Put code like the following in the OnCurrent event of the form AND in the
click event of the option button for positive.

Me.YourCheckBox.Enabled = Me.YourOptionButton

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm





.
Hello Lynn. When I put the code
(Me.PositiveTHC.Enabled=Me.Option58) in the OnCurrent
event and the got focus I got the following message:
Microsoft can't find the macro Me. or you may have used
an operator without an operand. What am I doing wrong?
 
L

Lynn Trapp

It ought to work, but you can try changing it to:

Forms!YourFormName!PositiveTHC.Enabled = Forms!YourFormName.Option58
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top