Case Approach Not Consistant

  • Thread starter Thread starter briank
  • Start date Start date
B

briank

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
 
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
 
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.
 
Back
Top