Hide Field based on subform checkbox

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.
 
M

Marshall Barton

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)
 

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