Solved

How do you change a positive number in Access to a negative or visa versa

Posted on 2012-04-01
9
233 Views
Last Modified: 2012-08-14
On my report, the items that were used show as a positive and the items that were received show as a negative.  See attachment.  How do I reverse these so the items used show as the negative and received as the positive.  This is Access 2007
meds.png
0
Comment
Question by:jrsitman
  • 4
  • 3
  • 2
9 Comments
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
You could just multiply the number by negative one.
For example:  Qty * -1
0
 

Author Comment

by:jrsitman
Comment Utility
In the query or on the report
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 200 total points
Comment Utility
Either will work but if you are using the query somewhere else as well and you don't need the numbers manipulated there then just do it in the text box of your report.  Just be sure to include the equal sign in the text box as in = Qty * -1.
0
 

Author Comment

by:jrsitman
Comment Utility
see attachment.  on the report I get an error.
meds1.png
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 29

Assisted Solution

by:IrogSinta
IrogSinta earned 200 total points
Comment Utility
Oops, in this instance it's confused between the name of your text box and the column name.  Just rename your text box to something like txtQuantity and you'll be set.
0
 
LVL 49

Assisted Solution

by:Gustav Brock
Gustav Brock earned 50 total points
Comment Utility
Seems like you have forgotten your lower school math introducing plus and minus ....

If you currently have a textbox named Qty bound to table field Qty, rename the textbox to txtQty and bind it to:

=-[Qty]

/gustav
0
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
Looks like cactus_data gave you an even better answer.  I myself didn't realize you could simply do that.
0
 

Author Closing Comment

by:jrsitman
Comment Utility
Both solutions worked.  Thanks
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
You are welcome!

/gustav
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

762 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

7 Experts available now in Live!

Get 1:1 Help Now