reports view doesn't run footer_format function

  • Thread starter Thread starter icccapital
  • Start date Start date
I

icccapital

I had found some code online to make a group footer visible or not, but it
doesn't seem to run in reports mode, only in print preview or print. Is
there something I am doing wrong or something different I need to do to
accomplish what I want?

Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] = "csus"
Or [Reports]![testAppRep1]![SecurityType] = "adus")
 
I meant to copy the whole function:

Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] =
"csus" Or [Reports]![testAppRep1]![SecurityType] = "adus")
End Sub
 
If the GroupFooter4 is in the report "testAppRep1" and SecurityType is a
bound control in the report, you should be able to use:
Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupFooter4.Visible = Instr("csus,adus", Me![SecurityType])>0
End Sub

--
Duane Hookom
Microsoft Access MVP


icccapital said:
I meant to copy the whole function:

Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] =
"csus" Or [Reports]![testAppRep1]![SecurityType] = "adus")
End Sub

icccapital said:
I had found some code online to make a group footer visible or not, but it
doesn't seem to run in reports mode, only in print preview or print. Is
there something I am doing wrong or something different I need to do to
accomplish what I want?

Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] = "csus"
Or [Reports]![testAppRep1]![SecurityType] = "adus")
 
I believe that no code runs in reports mode in 2007. The code only runs
in print priview or when printing.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Hmmm, then is there a solution to this problem for me? I don't want my users
to view the report when they are running it one way and then have it print
another even if the printed version is going to be correct.

John Spencer said:
I believe that no code runs in reports mode in 2007. The code only runs
in print priview or when printing.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

I had found some code online to make a group footer visible or not, but it
doesn't seem to run in reports mode, only in print preview or print. Is
there something I am doing wrong or something different I need to do to
accomplish what I want?

Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] = "csus"
Or [Reports]![testAppRep1]![SecurityType] = "adus")
 
Sorry, the only solution that I know of would be to not show your users the
report in reports mode.

Of course, I could be totally off the mark here.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

icccapital said:
Hmmm, then is there a solution to this problem for me? I don't want my
users
to view the report when they are running it one way and then have it print
another even if the printed version is going to be correct.

John Spencer said:
I believe that no code runs in reports mode in 2007. The code only runs
in print priview or when printing.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

I had found some code online to make a group footer visible or not, but
it
doesn't seem to run in reports mode, only in print preview or print.
Is
there something I am doing wrong or something different I need to do to
accomplish what I want?

Me.GroupFooter4.Visible = ([Reports]![testAppRep1]![SecurityType] =
"csus"
Or [Reports]![testAppRep1]![SecurityType] = "adus")
 
Back
Top