Form hide / unhide

  • Thread starter Thread starter xavier
  • Start date Start date
X

xavier

This is a repost, the suggestion I got before didn't
really help, Ill explain again what I want to acomplish.

I have a main form with a sub form, I would like the
subform either to be grayed out or not visible at all
unless a yes/no box in the main form is checked.

Or alternate solution would be a form button to open the
second form (wouldnt be a subform anymore) but how do I
keep it linked to the main form when data is added to
this second form.

I can do the form button but cant keep records in sync,
I open a particular record > open the form (via a button
on main form) add info on the second form but if I close
and return to this same record and second form the data
is not there but it is in the table that feeds the second
form.

Thanks
Xavier
 
Xavier,

Here's a thought. In the YesNoField's AfterUpdate event:

If YesNoField = True Then
Me.SubFormIdentifierName.Visible = True
Else
Me.SubFormIdentifierName.Visible = False
End If

Debbie


This is a repost, the suggestion I got before didn't
really help, Ill explain again what I want to acomplish.

I have a main form with a sub form, I would like the
subform either to be grayed out or not visible at all
unless a yes/no box in the main form is checked.

Or alternate solution would be a form button to open the
second form (wouldnt be a subform anymore) but how do I
keep it linked to the main form when data is added to
this second form.

I can do the form button but cant keep records in sync,
I open a particular record > open the form (via a button
on main form) add info on the second form but if I close
and return to this same record and second form the data
is not there but it is in the table that feeds the second
form.

Thanks
Xavier
 
What you want is very easy to accomplish, I think. Try to put something
like this in the AfterUpdate of the check box on the main form:

Me.SubformControl.Visible = Me.checkbox1

replacing the names of SubformControl and checkbox1 with the real names
you are using.
Good luck,
Pavel
 
Back
Top