How To Make Negative And Positive Values Affect Queries Differently

Jul 10, 2014

I have created an Access 2010 Database for tracking inventory. As parts move to each location, quantities automatically subtract from the previous location. I now realized that some parts are destroyed.

The problem is the if I simply enter a negative value to indicated that a part was destroyed at one location, it appears as a positive value in the previous location. Is there a way to make negative values not affect a specific query?

View Replies


ADVERTISEMENT

Queries :: Sum Positive And Negative Values In Same Field

Jun 18, 2015

I am trying to get sum "+" and "-" Values in same Field. I created new Expression Builder in Query and i wrote there :

A: Sum([tablename]<0)

of course it did not work.

How shall i update my expression to work this thing?

View 8 Replies View Related

Compare Negative Values With Positive

Jun 5, 2013

I am trying to to find a way to show all the positive values with nagative, in order words, if the value is 10,000 is should be followed by corresponding -10,000 so that the user could investigate if the entry is a reversible GL.

View 2 Replies View Related

Comparing Positive To Negative Values

Jan 20, 2014

I'm doing a bank-rec database, so on the one hand I'm comparing positive debits, to negative credits. How do I query to get, say, "Bank1 -$1000, Bank2 $1000"

View 1 Replies View Related

Queries :: Convert String To Positive / Negative Number

Feb 24, 2015

I have an expression that converts a string to positive/negative number. It seems to be working fine, however, it doesn't convert "00000000001}" to -10. It shows as 10.

This is the formula that I am using in my query:

PJUNAccrual: IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "J" And "S",-1,1)*(Val([PJ_ACCRUAL_ADJ_X])/IIf(IsNumeric([PJ_ACCRUAL_ADJ_X]),100,10)+(IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "A" And "I",(Asc(Right([PJ_ACCRUAL_ADJ_X],1))-64)/100,0))+(IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "J" And "S",(Asc(Right([PJ_ACCRUAL_ADJ_X],1))-73)/100,0)))*100

View 1 Replies View Related

Queries :: Purchase Order - Negative To Positive Number

Aug 14, 2014

This query tell me what quantity I am short of to make a part

diffqty: [StockQty]+[OnOrderQty]+[PendingQty]-Sum([OrderQty]*[ProductQty])

This will return a negative quanity iE -200

what I then would do is copy that to a purchase order but remove the negative sign can this can the formula be changed in anyway to give the positive number .

View 3 Replies View Related

Positive And Negative Amounts

Dec 20, 2005

I need to make a coupel of statements that display the total (sum) of negative amounts and positive amounts from a single list of results which comtains both negative and positive values. The two answers need to be displayed in the footer of a report.

View 12 Replies View Related

Sum Produces Negative Number - I Want Positive

Jul 2, 2005

What is the format to change the negative to a positive when:

=Sum([Field]="Novice")

Text box in report

View 5 Replies View Related

Making Negative Numbers Positive

Feb 4, 2006

I have a query where I have some negative numbers (f.e. -403,26) which I like to make a positive (i.e. 403,26).

How do I do this??

View 3 Replies View Related

Separating Positive And Negative Numbers

Jan 24, 2008

I have a field on my report that contains positive and negative numbers. I'm trying to find a way to Sum the column twice for two different fields (one for positive sum and the other negative) To make this easy let me give a small example with explanation of the issue I am having. 14 rows of data containing positive and negative numbers in a field called [Rooms]:

1) -1
2) 1
3) 1
4) 1
5) 1
6) 1
7) 1
8) 1
9) 1
10) 5
11) 1
12) -5
13) 1
14) 1

The positive numbers represent confirmations, the negative numbers represent cancellations. I need 2 fields to separate these. The first field's control source is Sum([Rooms]). No problem there. Access does the math and comes up with "8" confirmations which is correct. Then in the second (Cancellation field) I try something like Sum([Rooms]<0) to get the negative numbers which should add up to -7 (-1+-1+-5), but instead I get -3 because it's not summing the values, it's really returning the number of rows that has a negative number. Is there any way this can be done at the ControlSource Property of a report field? Or if I could do a "Where" clause in a ControlSource I could acheive it another way, but I don't that is possible. Is this just something I'm missing with the way I'm stucturing the ControlSource or is it not possible. Or alternatively, is there a way to separate it in the query and have a separate query field for positive and negative going into the report. I can do one or the other in the query but I can't seem to do both without showing values of each type in both query fields.

Thanks for your help!

View 3 Replies View Related

Reports :: Negative Numbers Show As Positive

Aug 28, 2013

I am trying to have a number that is negative hold its negative value but show as positive when it is displayed on a report.

View 6 Replies View Related

How To Change Negative Total To A Positive One In Report

May 30, 2013

I have a report which is counting and totalling numbers, but in the numbers show as negatives - I need them to show as positives.I managed to change the total in one counting field to positive but I've forgotten how - or where I put the code....

View 8 Replies View Related

Forms :: Textbox With Exclamation Mark If Value Is Negative Or Actual Number If Positive

Nov 5, 2014

Is it possible to format a textbox such that a negative value doesn't show numerically but in some other form (like a cross or exclamation mark from the Wingdings font, for example?)

I have a couple of textboxes which take their values from a function. The function is designed to return a long integer value which should always be greater than or equal to zero (the function counts the number of outstanding e-mails in a given Outlook folder, hence it should always be zero or higher)

However, as part of my error handling, if the function can't connect to the Outlook folder for whatever reason (for example, if the user does not have the appropriate permissions, or they do not have it mapped etc.), then it returns -1 (so I have some sort of value to identify a fail)

So currently, if such an error occurs, my textbox(es) will show -1 (and I can use conditional formatting to highlight this)

But it would be nice if it showed an "X" or "!" instead, and only showed the numerical value for 0 or positive. Is this possible?

View 14 Replies View Related

Tables :: Convert Positive Number To Negative Based On Another Field In A Table

Jun 1, 2013

I am trying to create a table for income and expense [catergory] and would like the amount being entered into the [amount] field to have a negative or positive value on entering based on the category chosen.

so in my table I have

[catergory] which is chosen from a look up table ( which is either an INCOME or EXPENSE )
[amount] which is entered in the next field ( which has to return a positive or negative value based on the catergory choosen upon entering the data)

I would like to go one step further and indicate this negative value in red is possible in my FORM.

View 3 Replies View Related

Query For 1 Or 0 In One Field According To Positive Or Negative Numbers In Another Field

Jan 13, 2015

I need to create a query in Microsoft Access to enter 1 or 0 in a field based on whether numbers in another field is positive or negative. Here are the details.

1 entered in a "late" field if "TotalHoursAheadOrBehindScedule" field has a positive number
0 entered in a "late" field if "TotalHoursAheadOrBehindScedule" field has a negative number

View 2 Replies View Related

Queries :: Negative Time Values When Export Access Query To Excel

Jul 10, 2013

The time difference in access query works very fine in 18:00 (Short Time) format , but when i export to excel it came out with "########" and the value is -0.14679132479

How to solve this problem , i keep trying but it doesn't work ....

View 14 Replies View Related

Convert Positive Number To Negative Number

Nov 22, 2011

This has to be a simple way to convert a positive number to a negative number. For example, convert 5 to -5. The field is quanitity and I wanted to convert to negative number. I tried to use negative = "-" & [quantity] but it doesn't work.

View 2 Replies View Related

Display Only Positive Values In My Query

Jan 30, 2007

Hi.. I am a beginner using access and there is probably an easy solution for this which i dont know about!

I have made a query where i calculate the tax deductions for a payroll system. my problem is that different workers are to be taxed differently given maritial status and number of kids as well as net income.

I have managed to calculate everything with the kids and wifes but now i need to sort the table after how much they earn to deduct taxes. I have a "first stage NetPay field" now, where i can see the Gross pay minus allowances for wifes and kids.

Now, if that value(first stage netpay) is under 8840 no more deductions are to occur. If the value is between 8840 and 10000 i have to deduct 15% of the excess above 8840

If the value is between 10000 and 20000 i have to deduct a further 174+ 25% of excess over 10000

If the value is above 20000 i have to deduct 2674+ 31% of excess over 20000


So far what i have done is make a new coloumn, where i take "first stage netpay field" and subtract 8840. If the value is negative i thought i could show only the positive values by enterin >0 in the criteria field for the query, this however will make no posts show up..

(I tried entering Abs() in the Field coloumn where i made the expression, and this worked. )


So my question is: is there a function like Abs() i could use that would convert negative values into 0?

Or do any of you guys have a better idea of how to solve this?




Hope someone can help me...


Takstein

View 8 Replies View Related

How Does Normalizing Affect Current Queries And Forms.

Feb 1, 2007

How does normalizing affect current queries and forms?I need to normalize a database here at work, the original creator made one BIG table.My concern is how will that normalization affect the current queries and forms I have created based on the current table?I tried the Wizard but that wont do the job I will have to do it manually.Thanks

View 2 Replies View Related

Queries :: Formatting Whole Numbers And Decimals Differently

Nov 26, 2013

I want to print the results of a query where some values are whole numbers, some have 1 decimal place, some have 0.3333333 recurring etc. Problem is that in order to fit all the columns on a page the column width does not allow all the 0.33333... to display. So what I see is like this (there are lots of columns, I am just giving an example from one column)

891
833.5
######

I don't want to fix decimal places to 1 because then I would see 891.0 instead of 891. How can I format the number field so that whole numbers are shown without decimal place, numbers with 1 decimal place stay like that i.e. 833.5 is fine as it is. But display something like 313.666666666667 as 313.67 rather than ##### getting put in as not enough room for all the decimal numbers.

View 5 Replies View Related

Queries :: Make All Of Values Divide Correctly?

Jul 31, 2014

Simple division, I thought! I'm dividing a Sum of hours by Pay Periods to determine the average of missing hours for year-to-date. Most of the division works perfectly, and some doesn't and appears to be related to values of 1 or less than one.The formula: [Sum]/[Pay Periods].Sum relates to total missing hours and pay periods are total pay periods for the year so far.What comes out wrong:

1 (hr) / 12 (pay periods) = 8.33, when it should be .0833
0.5 / 12 = 4.166 when it should be .0416

What is right is everything else, starting with 1.5 hrs

1.5 / 12 = 0.125

What do I need to do to make all of the values divide correctly?

View 3 Replies View Related

Queries :: Display Negative Number As HH:MM

Jul 9, 2015

I'm converting minutes to display as HH:MM but have an issue when the number is negative. How to write this so I don't end up with a negative in front of the minutes?

Format([Variance]60,"00") & ":" & Format(([Variance] Mod 60),"00")

i.e. -193 gives me -03:-13, whereas I would like -03:13

View 14 Replies View Related

Queries :: Rounding Negative Numbers Up To 0

Mar 13, 2015

I can not have any negitive numbers show up in my field so I need to round up and negatives to "0" ...

View 10 Replies View Related

Queries :: Filter Out Negative Results In Query

Feb 17, 2014

I have a query that I am using in VBA to select the number of days equipment is past due for service. I have an equipment table with a last maintenance field (tbleqDP with field DPLstMnt) and another table (tblmaintdue) that defines the maintenance interval. I have a query (qrynumdays) that finds the number of days from tblmaintdue for the equipment type based on a value in cboMaintEquipType combobox. The VBA then generates a report based on which type of equipment is selected using a select case statement. An excerpt of the VBA is below:

Select Case cboMaintEquipType.Value
Case "DP"
Set qdf = db.CreateQueryDef("qryoverdue", _
"Select DPTag, DPLstMnt, DateDiff(""d"",DPLstMnt,Now())-NumDays AS Overdue from tbleqDP, qrynumdays where Overdue > 0")
DoCmd.OpenQuery "qryoverdue"
DoCmd.OpenReport "rptDPmntovrdue", acViewPreview

I am having problems with the "where overdue > 0" statement. It is asking me for parameter value for overdue. How can I get this to automatically filter out any values that are negative - in other words, don't report on equipment that is not past its maintenance interval due date.

Also, I think there is a way around how I am naming my query in the createquerydef function because later I just delete the query after the report is run. Is there a better way to do that.

View 2 Replies View Related

Would Changing Menu Bar Affect All Db's?

Apr 29, 2005

I want to know if I change the menu bar in an Access db (such as take out every thing, edit, view, format, tools, etc. except file and exit) would it remain that way in every other db that was opened on that pc?

I want to restrict access to every tool except file, exit on only one pc (a public pc) and I am afraid to mess around with this in the event I screw something up again like I almost did yesterday...Security on that one pc is all I need, because the program needs to be accessible to managers for reports. This pc is in an out of the way place that allows employees to "play around" in it and I am not sure enough about how to secure it any other way. So, I reasoned that if I could restrict ability to roam on that pc then that is all I would need.

View 2 Replies View Related

Forms :: Two Comboboxes Don't Affect Each Other

Mar 12, 2013

In my database you can search on either number or name. I have therefor, two combo boxes. and it works well, except that...

When I pick by number first, and then try to pick another record using the name combobox, the number combobox still shows the first search I did. I would like the two comboboxes to interact with each other...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved