Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2006

Tip: Looking for answers? Try searching our database.

Hiding SubForm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 13 Nov 2006 16:12 GMT
I cam across a post on this board giving code on how to hide a subform
depending on if a check box was true or fals.  I am trying to recreate and
can hide the subform based on the checkbox's initial value when opening the
form/subform, but if I check the checkbox to hide/unhide the subform, it does
nothing.  Any suggestions on what I am missing.

Switch = checkbox field
ViewNoteForm = subform.

Private Sub Form_Current()
If Me!Switch = True Then 'checkbox on parent form
Me!ViewNoteForm.Visible = True 'subform
Else
Me!ViewNoteForm.Visible = False
End If
End Sub
Jay - 13 Nov 2006 16:20 GMT
Disregard request, I found the answer in another post.

> I cam across a post on this board giving code on how to hide a subform
> depending on if a check box was true or fals.  I am trying to recreate and
[quoted text clipped - 12 lines]
> End If
> End Sub
Douglas J. Steele - 13 Nov 2006 16:20 GMT
Check that the name of the control on the main form that holds the form
being used as the subform is, in fact, named ViewNoteForm. Depending on how
you added the subform to the main form, the name of the subform control may
not be the same name as the form being used as a subform. (You want the name
of the control)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I cam across a post on this board giving code on how to hide a subform
> depending on if a check box was true or fals.  I am trying to recreate and
[quoted text clipped - 14 lines]
> End If
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.