Solved

money field

Posted on 1998-11-17
3
220 Views
Last Modified: 2006-11-17
Hi,

I got some money field in my form and if I dont write anything in the field I want to be able to print my report but in the field where there is no amount enter I dont want to see the 0.00 $  I want the field to be empty in my report.

Thanks.
0
Comment
Question by:runner100
3 Comments
 
LVL 10

Accepted Solution

by:
brewdog earned 0 total points
ID: 1968633
Put some code on the format event of your report that says:

If IsNull([Money]) Then
    [Money].visible = false
Else
    [Money].visible = true
End If

Or you can change the forecolor of the text box to white, or ...

hope one of those helps.

brewdog
0
 
LVL 1

Expert Comment

by:toys032498
ID: 1968634
You could add code in the After Update, or on the Lost Focus, or put in the report on the On Open to read:

If myfield.text = 0.00 then
myfield.text = ""
End If

You could also just change the format to read after update.
0
 
LVL 7

Expert Comment

by:Dedushka
ID: 1968635
Hi, runner100!

In the report design view set (do not select from list, just overtype) for your money field the value of format property instead default Currency format to this (or like this) format

$0.00;-$0.00;""

first part is format ($0.00) for positive values,
second (-$0.00) -for negative,
third ("" empty string) - for zero values, so $0.00 do not print.

Good luck, runner100...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now