Report format

  • Thread starter Thread starter Matthew
  • Start date Start date
M

Matthew

I have a report with the data formatted as Currency.

Is there a quick and easy way to display the value 0 as a blank space,
instead of $0.00?

Matthew
 
Why don't you try making the field invisible?
Let's say your textbox "txtAmount" is within the detail
portion of your report:
In design veiw, from the menu click View > Code
then...

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
txtAmount.Setfocus
txtAmount.Visible = IIf(txtAmount = 0, False, True)
End Sub
 
Open to the database window and open the table where your data comes from in
design view. Select the currency field at the top. At the bottom, delete the 0
in default value.
 
Hi Matthew,

You can also use Conditional Formatting under Format, while you are in the
report design view.
Select the box of your currency field, then follow the above, once there
select Field Value Is (under Condition 1), equal to, type 0 (zero), and
finally select Font/Fore color as white.
The zero value will not show eventhough it is there.

Hope this helps.

Alp
 
Whoa.... Please don't send people off on un-tested journeys into the
impossible. You can never place the focus on a control in a report. Besides,
there are solutions that involve absolutely no coding.
 
Check Help on Format Property - Numeric and Currency Data Types.

From Help:
For example, you could use the following custom Currency format:
$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

Replacing "Zero" with "" would hide all 0 values.

-- Duane HookomMS Access MVP
 
Back
Top