Re: Hiding a field from a sub form.
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 May 2007 18:00:16 -0600
On Fri, 18 May 2007 14:50:00 -0700, TheNovice
<TheNovice@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I know that this looks easy (and it probably is) but this is what I need to do.
I have this code that I can hide a field within the same form
' NI.Visible = Not NB
And this works just fine.
what I would like to do is Hide a Field from a Sub Form and I am hitting a
wall.
I tried this, so please tell me where I am brain dead.
frmDateEntry!product.visible = not NB
Referring to a Subform is a bit tricky. The subform is not part of the Forms
collection, as it's not open in its own right; you need to navigate to it from
the mainform, via the Name property *of the Subform control* container - which
might or might not be the same as the name of the form within that container.
For code on the mainform, it would be
Me!subformname.Form!product.Visible = <whatever>
If the code is in the subform, then you can just use
Me!product.Visible = ...
John W. Vinson [MVP]
.
- Prev by Date: Re: Divide File Size By 4096
- Next by Date: Re: Combo Box Filter
- Previous by thread: Re: Emailing from Form
- Next by thread: Re: Hiding a field from a sub form.
- Index(es):
Relevant Pages
|