Hide Field based on subform checkbox

  • Thread starter Thread starter DRMOB
  • Start date Start date
D

DRMOB

I have been searching for while now. Please help. I have a form with a
check box. If this box = False I want to hide a field on a subform. What
would be the correct code and where do I put it? I am confused as to when to
use After Update, On Current etc.

The check box field name = RevisedGrant (which is on DataEntryFrm)
If not checked or isnull, I do not want to see "RevisedCost" (which is on
TotalCostsubform within Totalsubform on DataEntryFrm). To be clear as mud,
my main form has a subform and that subform has another subform. Please help
I've spent way too much time on what is quite simple, I'm sure. Thanks in
advance.
 
DRMOB said:
I have been searching for while now. Please help. I have a form with a
check box. If this box = False I want to hide a field on a subform. What
would be the correct code and where do I put it? I am confused as to when to
use After Update, On Current etc.

The check box field name = RevisedGrant (which is on DataEntryFrm)
If not checked or isnull, I do not want to see "RevisedCost" (which is on
TotalCostsubform within Totalsubform on DataEntryFrm). To be clear as mud,
my main form has a subform and that subform has another subform. Please help


Use a line of code in both the chek box's AfterUpdate event
and in the form's Current event:

Me.Totalsubform.Form.TotalCostsubform.Form.RevisedCost.Visible=Nz(Me.RevisedGrant,False)
 
Back
Top