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 / Reports / Printing / April 2008

Tip: Looking for answers? Try searching our database.

Eliminate Group Footer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wahab - 29 Apr 2008 06:26 GMT
Hi there,
In a report I have Report  Header; Page Header; CustomerID Header; Detail;
CustomerID Footer ; Page Footer and Report Footer.  In CustomerID Footer  I m
doing the sum( RvTotal) which will just add the RV and bring the total of
each customers receipts.  
In a customerID Footer ,  I don’t want to show the sum of RV when customer
paid only 1 time only.
Please help me How I will write the code?
Thanks
Evi - 29 Apr 2008 09:41 GMT
I'll call the control that contains the sum txtSum

Add a control txtCount (invisible) to the customerID footer with the text
=Count(*)

In the On Format Event of the Footer Section (if you have no other code in
this section) put this code just above End Sub editing as indicated in the
comments

Dim ctrl As Control

For each ctrl in Me.Section(x).Controls
'replace x with the correct Section number for your group footer
   If Me.txtCount >1 Then
       ctrl.Visible = True
   Else
       ctrl.Visible = False
   End If
Next ctrl
Me.txtCount.Visible = False
'make txtCount invisible whatever happens

Evi

> Hi there,
> In a report I have Report  Header; Page Header; CustomerID Header; Detail;
[quoted text clipped - 5 lines]
> Please help me How I will write the code?
> Thanks
Wahab - 29 Apr 2008 11:50 GMT
> I'll call the control that contains the sum txtSum
>
[quoted text clipped - 30 lines]
> > Please help me How I will write the code?
> > Thanks

Thanks Evi for your quick reply,
Seems code is working as im not getting any error message, but it is not
hiding my codes are as follows:
Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Dim Ctrl As Control

For Each Ctrl In Section(1).Controls
   If Me.txtCount > 1 Then
       Ctrl.Visible = True
   Else
       Ctrl.Visible = False
   End If
   Next Ctrl
Me.txtCount.Visible = False
End Sub
i dont have to set Ctrl = txtSum? even than also not hidding?
Pls check
Evi - 29 Apr 2008 16:10 GMT
> > I'll call the control that contains the sum txtSum
> >
[quoted text clipped - 48 lines]
> i dont have to set Ctrl = txtSum? even than also not hidding?
> Pls check

The problem is the Section number. I should have explained this.
As a logical person, you thought that GroupFooter1 would be Section 1. If
you look up the section property in Help you will see that Section 1 is the
Report Header. GroupFooter1 is probably 6.

Evi
Wahab - 30 Apr 2008 05:31 GMT
> > > I'll call the control that contains the sum txtSum
> > >
[quoted text clipped - 62 lines]
>
> Evi

Thanks Evi, it is working perfectly.
 
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.