Help with enabling a field using a checkbox in Subforms

T

Tony

Hi everyone.

Here is my problem: I have a form (frmMainCoils) that contains two
subforms: one for type (subType_of_Coil) that is locked and cannot be
edited on this main form, and one for quality (subQC_data).

Under the subQC_data I have two fields TG and SNR that i only want
enabled if the checkbox VolumeCoil (a field in SubType_of_Coil) has
been previously selected from another form.

I know I need to use a on Current event and this was what I tried, and
it is not working...

For the subQC_data, on current:

Me![TG].enabled = forms![sutbType_of_Coil]![VolumeCoil] = False

and it keeps giving me debug errors. Do I have the syntax wrong, and
would I also need an after uptade field as well?

Thanks!!!

Tony
 
C

Clifford Bass

Hi Tony,

Well, there appears to be a misspelling; an extraneous t between su and
bType. Plus you do not need the = False part since the value of a check box
is a boolean value. And doing something = (checkbox = False) will do the
reverse of what you described. Try:

[TG].Enabled = Forms![subType_of_Coil]![VolumeCoil]

Clifford Bass
 

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