reports view doesn't run footer_format function

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

icccapital

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
 
D

Duane Hookom

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")
 
J

John Spencer

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

icccapital

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")
 
J

John Spencer

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top