Visible Property

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I have a form with a subform. In the subform, for each
record there is a field called "Returned". This field is
a Yes/No type. If the Returned field is checked, I want
two additional fields on that specific record to be
available for completion (date returned and quantity
returned.) I have these two fields initially set to
Visible = No.

I can figure out how to turn all these fields to visible,
but I turn them ALL on for each record in the subform when
I do it. How can I do just those for the one record?

(I'm using code to say If Returned = True,
DateReturned.Visible = True....and so on.)

Thanks.
 
You cannot toggle the Visible property of a control for only some rows of a
continuous form or datasheet.

You may be able to use conditional formatting to alter the background or
text color so they look as if they are not present.
 
I assume the subform is displayed in continuous form mode? If so, you are
out of luck. When you change a property of a control in a continuous form -
be it a subform or a main form - it changes that property (of that field) in
every record< of that form or subform.

HTH,
TC
 
There's a sample Form on my site here showing how to do just that using
Conditional Formatting.
http://www.lebans.com/conditionalformatting.htm

To the OP though, the accepted WIndows GUI is to Disable/Enable the
relevant controls instead of forcing them to be visible or not which can
be confusing to the user. Conditional Formatting does support the
Enabled prop.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top