A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Case Approach Not Consistant



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2010, 06:52 PM posted to microsoft.public.access.reports
briank
external usenet poster
 
Posts: 96
Default Case Approach Not Consistant

I am trying to get a text box in my footer (Me.TextFooterNote) to show
visible if a text box calculation in my detail section (Me.TextCalc)=1.
Depending on the parameters, there could be one record or 30 records. Either
way, if just one text box calculation equals 1 then I want the footer text
box to be visible. When I run the report with one record in the output and
the detail text box = 1 then the footer is visible which is what I want. But
when the parameters change and there are several detail text boxes (some with
1 some with 0) then the footer is not visible which I don't want.

' Select Case Me.TextCalc
' Case 1
' Me.TextFooterNote.Visible = True
' Case 0
' Me.TextFooterNote.Visible = False
' End Select

  #2  
Old April 9th, 2010, 07:56 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Case Approach Not Consistant

So you want TextFooterNote to be visible if TextCalc = 1 for ANY detail record
in the section?

If you don't need to show textCalc then I would make it a running sum over
group and then use

If Me.txtCalc 0 then
Me.txtFooterNote.Visible = True
ELSE
Me.txtFooterNote.Visible = False
END IF

OR if you can just sum the calculation in a (not visible) control in the
footer and use that value to control the visibility of the txtFooterNote
control. Since you have not shared the calculation I don't know if this is
feasible, but it should be.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

briank wrote:
I am trying to get a text box in my footer (Me.TextFooterNote) to show
visible if a text box calculation in my detail section (Me.TextCalc)=1.
Depending on the parameters, there could be one record or 30 records. Either
way, if just one text box calculation equals 1 then I want the footer text
box to be visible. When I run the report with one record in the output and
the detail text box = 1 then the footer is visible which is what I want. But
when the parameters change and there are several detail text boxes (some with
1 some with 0) then the footer is not visible which I don't want.

' Select Case Me.TextCalc
' Case 1
' Me.TextFooterNote.Visible = True
' Case 0
' Me.TextFooterNote.Visible = False
' End Select

  #3  
Old April 9th, 2010, 08:07 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Case Approach Not Consistant

briank wrote:

I am trying to get a text box in my footer (Me.TextFooterNote) to show
visible if a text box calculation in my detail section (Me.TextCalc)=1.
Depending on the parameters, there could be one record or 30 records. Either
way, if just one text box calculation equals 1 then I want the footer text
box to be visible. When I run the report with one record in the output and
the detail text box = 1 then the footer is visible which is what I want. But
when the parameters change and there are several detail text boxes (some with
1 some with 0) then the footer is not visible which I don't want.

' Select Case Me.TextCalc
' Case 1
' Me.TextFooterNote.Visible = True
' Case 0
' Me.TextFooterNote.Visible = False
' End Select



You need to do someting to check all the details (ie. an
aggregate function).

That can be done by adding a text box (named txtNoteTotal)
to the footer section. Set its expression to something
like:
=Sum(IIf(entire text box calculation expression], 1, 0))

Then your code could be like:
Me.TextFooterNote.Visible = (txtNoteTotal 0)

--
Marsh
MVP [MS Access]
  #4  
Old April 9th, 2010, 09:29 PM posted to microsoft.public.access.reports
briank
external usenet poster
 
Posts: 96
Default Case Approach Not Consistant

John, Your suggestion to make it a running sum made the difference. I can't
tell you how much time I spent on this with out thinking of that solution.
Thx.


"John Spencer" wrote:

So you want TextFooterNote to be visible if TextCalc = 1 for ANY detail record
in the section?

If you don't need to show textCalc then I would make it a running sum over
group and then use

If Me.txtCalc 0 then
Me.txtFooterNote.Visible = True
ELSE
Me.txtFooterNote.Visible = False
END IF

OR if you can just sum the calculation in a (not visible) control in the
footer and use that value to control the visibility of the txtFooterNote
control. Since you have not shared the calculation I don't know if this is
feasible, but it should be.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

briank wrote:
I am trying to get a text box in my footer (Me.TextFooterNote) to show
visible if a text box calculation in my detail section (Me.TextCalc)=1.
Depending on the parameters, there could be one record or 30 records. Either
way, if just one text box calculation equals 1 then I want the footer text
box to be visible. When I run the report with one record in the output and
the detail text box = 1 then the footer is visible which is what I want. But
when the parameters change and there are several detail text boxes (some with
1 some with 0) then the footer is not visible which I don't want.

' Select Case Me.TextCalc
' Case 1
' Me.TextFooterNote.Visible = True
' Case 0
' Me.TextFooterNote.Visible = False
' End Select

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.