View Full Version : disabling checkboxes


tbonnerjr
08-07-2000, 11:27 AM
What I need is to disable/enable a checkbox depending on information in another form. For example, if you were to input that you are single, you can't input that you have been married for 5 years. Thanks.

gino
08-07-2000, 04:10 PM
do these two forms share the same tables?

first set the checkbox enabled to no then in the event onOpen you can have an if statement.

for example:
if me.yourfield = "single" then
'do nothing
else
me.yourcheckbox.enabled =true
end if

if you have the first form open then use this:

if forms!yourfirstform!me.yourfield = "single" then
'do nothing
else
me.yourcheckbox.enabled =true
end if

this is just an example. depending how you set the tables and forms you might have to modify the code.

have fun




[This message has been edited by gino (edited 08-07-2000).]