A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Updating subform with a control on main form



 
 
Thread Tools Display Modes
  #1  
Old January 18th, 2008, 05:45 AM posted to microsoft.public.access.forms
tsison7
external usenet poster
 
Posts: 69
Default Updating subform with a control on main form

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?
--
TIA
  #2  
Old January 18th, 2008, 11:41 AM posted to microsoft.public.access.forms
Brendan Reynolds
external usenet poster
 
Posts: 1,241
Default Updating subform with a control on main form

"tsison7" wrote in message
...
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?
--
TIA



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.

--
Brendan Reynolds

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.