?
Solved

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

Posted on 2012-04-01
9
Medium Priority
?
239 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:J.R. Sitman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 29

Expert Comment

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

Author Comment

by:J.R. Sitman
ID: 37794112
In the query or on the report
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 800 total points
ID: 37794134
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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:J.R. Sitman
ID: 37794465
see attachment.  on the report I get an error.
meds1.png
0
 
LVL 29

Assisted Solution

by:IrogSinta
IrogSinta earned 800 total points
ID: 37794493
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 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 200 total points
ID: 37794764
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
ID: 37794835
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:J.R. Sitman
ID: 37795904
Both solutions worked.  Thanks
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 37795935
You are welcome!

/gustav
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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