Check Box / Bound field

G

Guest

I currently have a form with a tab setup. The first tab includes a subform
that includes a check box and bound field. When I click the check box the
bound field responds by being visible or not visible. This works great.

However, in the next tab over I want the viewer to see the same data without
having to reclick. In fact, the inserted form is locked so they wont'
inadvertently click something. When I view this tab I notice that the check
box mimics the previous tab but not the bound. I have to close out the form
and reopen to get this to work.

In the first tab is the code that works great:
Private Sub Form_Current()
If Me.MF_OtherYN = -1 Then
Me.MF_OtherText.Visible = True
Else: Me.MF_OtherText.Visible = False
End If
End Sub

Can anyone suggest a way to get this to work?
 
C

Carl Rapson

briank said:
I currently have a form with a tab setup. The first tab includes a subform
that includes a check box and bound field. When I click the check box the
bound field responds by being visible or not visible. This works great.

However, in the next tab over I want the viewer to see the same data
without
having to reclick. In fact, the inserted form is locked so they wont'
inadvertently click something. When I view this tab I notice that the
check
box mimics the previous tab but not the bound. I have to close out the
form
and reopen to get this to work.

In the first tab is the code that works great:
Private Sub Form_Current()
If Me.MF_OtherYN = -1 Then
Me.MF_OtherText.Visible = True
Else: Me.MF_OtherText.Visible = False
End If
End Sub

Can anyone suggest a way to get this to work?

You'll need to explicitly handle the other control at the same time you do
your first control:

If Me.MF_OtherYN = -1 Then
Me.MF_OtherText.Visible = True
Me.Parent.<name_of_other_control>.Visible = True
Else
Me.MF_OtherText.Visible = False
Me.Parent.<name_of_other_control>.Visible = False
End If

If the other control is also in a subform (on the second tab), you'll need
to add that to the path:

Me.Parent.<name_of_subform_control>.Form.<name_of_other_control>.Visible
= True/False


Carl Rapson
 

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