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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Negative Value based on Field Value 2

Status
Not open for further replies.

grendal

MIS
Sep 30, 2001
35
GB
I have a report which lists stock tickets bassed on status, with a value for each ticket.

Where I have a negative status e.g. Missing Stock, how can I make the value of that status group report as a negative value, ensuring my overall stock value is not over inflated.

Cheers s-)
Does the body rule the mind or does the mind rule the body - I dunno!
 
The easiest way is to test the status in the query that the report is based on and if necessary, multiply by -1.

TVal:iif([status]= "Missing", -1*[ticketvalue], [ticketvalue])

Of course, how easy this is to code will depend on how easy it is to identify 'negative' statuses. If there are several different values for positive and negative then it might be easier to write a function to work it out.
 
Thought --- you might want to use Conditional Formatting to change the background color if the amount is negative. You can still have the negative sign, but with a color of red would make it stick out.



An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top