I have added a text box to my report so that the user can quickly tell if the values have gone up or down when comparing current month to the same month a year ago. The report is grouped such that each detail contains 2 rows. I would like the indicator text box to appear to display its results between the two, but not sure if the can grow property or some other property can accomplish, also rather than having the words "UP", "Down", "Unchanged" is there code to display arrows? I tried using the charmap and copy-paste to the code, but it only displayed an A with a circle above it. (Font used on report is Times New Roman)
Currently, display looks something like this:
[tt]
May-06 4
May-05 Up 3
-------------------------
May-06 7
May-05 Down 8
-------------------------
[/tt]
Would like the Up/Down to appear either between the 06 and 05 or on the 06 row at worst case.
Here is the code, excuse the poor names as it's a quick and dirty test at this point.
[tt]
ScoreHeader
---------------------
TextBox
---------------------
Detail
---------------------
TextBox TextBox TextBox
---------------------
ScoreFooter
---------------------
TextBox
---------------------
[/tt]
Currently, display looks something like this:
[tt]
May-06 4
May-05 Up 3
-------------------------
May-06 7
May-05 Down 8
-------------------------
[/tt]
Would like the Up/Down to appear either between the 06 and 05 or on the 06 row at worst case.
Here is the code, excuse the poor names as it's a quick and dirty test at this point.
[tt]
ScoreHeader
---------------------
TextBox
---------------------
Detail
---------------------
TextBox TextBox TextBox
---------------------
ScoreFooter
---------------------
TextBox
---------------------
[/tt]
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim dblCY As Double
Dim dblPY As Double
If Me.ScoreRange = Forms!frmmain.txtCurYr Then
Me.Text90 = Me.Text5
Me.Text90.Visible = False
Else
dblCY = Me.Text90
dblPY = Me.Text5
If dblCY - dblPY < 0 Then
Me.Text90 = "Down"
ElseIf dblCY - dblPY > 0 Then
Me.Text90 = "Up"
Else
Me.Text90 = "On Par"
End If
Me.Text90.Visible = True
dblCY = 0
dblPY = 0
End If