Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Fields

Status
Not open for further replies.

luceze

Programmer
Apr 26, 2001
842
US
In a report with grouping I am trying to hide a $ sign on all but the first record in the report. Setting the Hide Duplicates to yes only hides the symbol after the first record in the group. The first record in every group still has a $ sign. If there is any way to do this I would really love to know.
 
Wow, this I believe is easier said than done. One way I can think of is to have a hidden control to act as a trigger then apply formatting to the control with the '$' based on the trigger.

Create an unbound textbox with the following attributes:

Name:
Trigger

Controlsource:
=1

Visible:
No

Running Sum:
Over Group or Over All depends on what you want

Then in the OnFormat event property of the report's detail section use the following:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me.Trigger = 1 Then
Me.Ticket.format = "$#,###.#0"
Else
Me.Ticket.format = "#,###.#0"
End If

End Sub


NOTE: I did not use the "Currency" format as this allows for parentheses for negative values and would not line up with the following values. You may use whichever predefined formats you want or those I've provided.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top