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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|