Updating subform with a control on main form

  • Thread starter Thread starter tsison7
  • Start date Start date
T

tsison7

I have a subform in DS view and I'd like to be able to hide certain columns
with an option box on the main form.

I know how to hide a column on a form in DS view with "columnhidden". But
how can I dynamically update the subform with my option box?
 
tsison7 said:
I have a subform in DS view and I'd like to be able to hide certain columns
with an option box on the main form.

I know how to hide a column on a form in DS view with "columnhidden". But
how can I dynamically update the subform with my option box?


Private Sub fraTest_AfterUpdate()
Me.sfrTest.Form.Controls("txtTest").ColumnHidden = (Me.fraTest.Value =
2)
End Sub

In this example, "fraTest" is the option group, "sfrTest" is the name of the
subform control, and "txtTest" is the name of a text box on the form
contained within the subform control. The option group has values 1 for Show
and 2 for Hide.
 

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

Back
Top