Form hide / unhide

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
 
D

DebbieG

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
 
P

Pavel Romashkin

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
 

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