display -ve number in report in this format: (-1)

  • Thread starter Thread starter Lim Heng Sin
  • Start date Start date
L

Lim Heng Sin

i have a text box in a report. The value calculated is
from query. The value calculated can be positive number
and negative number. Now what i want to do is when the
calculated value is negative number, it will be display on
this format
(-1)
(-10)

Can i know how to do it and where should i put the code?
I tried something like that but it doesn't work. I put
this code on

Dim strDueDay As String
strDueDay = Me!txtDueDay
If strDueDay < 0 Then
strDueDay = "(" & strDueDay & ")"
End If

On Open event but id doesn't work.
 
Hi Lim,

put the following into the Format property of the TextBox
control:

#,##0;(-#,##0)

hth

chas
 
Back
Top