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 / Modules / DAO / VBA / July 2007

Tip: Looking for answers? Try searching our database.

Make subform not visible on my Report with code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TKM - 23 Jul 2007 17:54 GMT
I have a report with several subforms (I did not design this mess). One of
the subforms is not only a subform on a reoprt but it is also nested into
another subform on the same report (it looks like it is). What I need is to
have that suform not show if the option box on my main form is false. The
comments work correctly however I have a blank section (page on report) where
the comments use to be. This could be a 1/4, 1/2 or a full page depening on
how many comments I have. Can someone direct me to the correct solution

Here is my code..

If Forms!frmMain!Comment = True Then
   
     Me.[rsubJoseReport-InProcessComments].Visible = True
   
      Else

          Me.[rsubJoseReport-InProcessComments].Visible = False
 
               Me.[rsubJoseReport-InProcessComments].Height = 0
       
       End If
Marshall Barton - 23 Jul 2007 20:11 GMT
>I have a report with several subforms (I did not design this mess). One of
>the subforms is not only a subform on a reoprt but it is also nested into
[quoted text clipped - 17 lines]
>        
>        End If

Setting the Height to 0 won't help here.

I think (never tried it with subform instead of subreport)
all you need is set both the subform control and its
section's CanShrink to Yes.  This way, the report should
reclaim all the subform's space when it is invisible.

Signature

Marsh
MVP [MS Access]

 
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.