Make positive number negitive

Budget is our income and sometimes this is positive.  I need to make this 
column in a query all negitive values.

I am using the IIf function but it is not working.

Budget: [budget_amount] IIf ([budget_amount] >=0, [budget_amount]*-1, 
[budget_amount]) 

or is there another function I could use?
0
Utf
10/30/2007 2:18:00 AM
access.reports 4434 articles. 0 followers. Follow

3 Replies
830 Views

Similar Articles

[PageSpeed] 12

On Mon, 29 Oct 2007 19:18:00 -0700, Tamm Fox wrote:

> Budget is our income and sometimes this is positive.  I need to make this 
> column in a query all negitive values.
> 
> I am using the IIf function but it is not working.
> 
> Budget: [budget_amount] IIf ([budget_amount] >=0, [budget_amount]*-1, 
> [budget_amount]) 
> 
> or is there another function I could use?

In a query?

Budget:IIf ([budget_amount] >=0, [budget_amount]*-1, 
[budget_amount]) 

All values will be negative.
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
fredg
10/30/2007 3:57:06 AM
> On Mon, 29 Oct 2007 19:18:00 -0700, Tamm Fox wrote:
> 
> > Budget is our income and sometimes this is positive.  I need to make this 
> > column in a query all negitive values.
> > 
> > I am using the IIf function but it is not working.
> > 
> > Budget: [budget_amount] IIf ([budget_amount] >=0, [budget_amount]*-1, 
> > [budget_amount]) 
> > 
> > or is there another function I could use?

"fredg" wrote:
 
> In a query?
> 
> Budget:IIf ([budget_amount] >=0, [budget_amount]*-1, 
> [budget_amount]) 
> 
> All values will be negative.
> -- 
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail

Fred

Thank you. Yes when i realised that i posted this in the report section, I 
then posted it in the query section.

but still it does not work.

I dont know whats wrong.

I deleted what i had in the expression builder, coppied what you wrote and 
pasted it directly in expression builder. for the "Field" row (and 
subitiuted "budget" for "budget_amount").

ERROR: syntax error (comma) in query expression 
'dbo_jobcactb.[IIf(budget_amount]>=0,[budget_amount]*-1,[budget_amount])]'.

(NOTE: "dbo_jobcactb" is the table that "Budget" comes from and the outside 
[] is put in the error itself).
(NOTE: "Budget:" was just what i renamed the column from "budget_amount").

I have tried deleting the comma but still does not help.

Am i missing something somewhere?



0
Utf
10/30/2007 4:53:00 AM
 > On Mon, 29 Oct 2007 19:18:00 -0700, Tamm Fox wrote:
> > 
> > > Budget is our income and sometimes this is positive.  I need to make this 
> > > column in a query all negitive values.
> > > 
> > > I am using the IIf function but it is not working.
> > > 
> > > Budget: [budget_amount] IIf ([budget_amount] >=0, [budget_amount]*-1, 
> > > [budget_amount]) 
> > > 
> > > or is there another function I could use?
> 
> "fredg" wrote:
>  
> > In a query?
> > 
> > Budget:IIf ([budget_amount] >=0, [budget_amount]*-1, 
> > [budget_amount]) 
> > 
> > All values will be negative.
> > -- 
> > Fred
> > Please respond only to this newsgroup.
> > I do not reply to personal e-mail
> 
> Fred
> 
> Thank you. Yes when i realised that i posted this in the report section, I 
> then posted it in the query section.
> 
> but still it does not work.
> 
> I dont know whats wrong.
> 
> I deleted what i had in the expression builder, coppied what you wrote and 
> pasted it directly in expression builder. for the "Field" row (and 
> subitiuted "budget" for "budget_amount").
> 
> ERROR: syntax error (comma) in query expression 
> 'dbo_jobcactb.[IIf(budget_amount]>=0,[budget_amount]*-1,[budget_amount])]'.
> 
> (NOTE: "dbo_jobcactb" is the table that "Budget" comes from and the outside 
> [] is put in the error itself).
> (NOTE: "Budget:" was just what i renamed the column from "budget_amount").
> 
> I have tried deleting the comma but still does not help.
> 
> Am i missing something somewhere?
> 
> 

"Tamm Fox" wrote:

I was trying to do all the calulations within the column that the data was 
in. for some reason access didnt like this.  

Workaround: i created another column next to the budget column and used:
Budget_2:IIf ([budget_amount] >=0, [budget_amount]*-1, [budget_amount])


0
Utf
10/30/2007 5:06:01 AM
Reply:

Similar Artilces:

show total number of items in Inbox and Sent Items
My Outlook 2002 used to show (somewhere on the bottom of the screen) the total number of items in the folder that was highlighted, if the folder was "Inbox" or "Sent Items". This was helpful because I try to keep the number of items pretty low. Somehow (updates, patches, our IT person???) this function has disappeared. Any ideas on getting it back? Thanks ...

Make Default
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: Exchange Hi I have a script to open entourage to configure a account, although the first time round for every user the script stops due to the message in Entourage asking would you like to make entourage you default browser. <br> Anyone have a script to set this to default or any way of setting this so it never ask's ? <br><br>thanks This is a multi-part message in MIME format. ----------------709806166701805979 Content-Type: text/plain; charset=iso-8859-1; format=flowed C...

bin numbers on invoices/orders
We are using gp v 7.5 and would like to have bin numbers that contain the items on the invoice to show on the invoice so it can be pulled more efficiently, our stock varies quite a bit so it would not be possible to assign a default bin for items is this possible ? Steve, Normally, people pull inventory from the pick ticket rather than the invoice. The default pick tickets in GP do contain the bin numbers. Look at the structure of the pickticket document, particularly the tables used and it should lead you to the changes needed in the invoice document. Richard L. Whaley Senior Bus...

Making a Pivot chart from 3 differnt sets of data / worksheets.
Hi, I have 2 workshsheets of data with a list of delivery dates of about 10 different products over the last 3 years, (i cant combine these to just 1 worksheet for other separate reasons) and a 3rd worksheet with a column of the same products and dates that some of these products became faulty and were sent back to me . On a 4th worksheet, I am trying to do a graph that looks at the 3 worksheets and plots pivot table of dates and amount of each product deliveries & returned to me. So as i select ,say, product A from that pivot list, it produces a graph for these 3 variables (dat...

Positioning POS against Intuit
“Hey My, Intuit's POS system allows their store owners to have mulitple stores and has the same aspects as you would have with running Retail Management Systems w/ the Headquarters program. If we could get that into this low cost program I see a great way to compete with Intuit. The only thing that MSPOS would really need is a way to download inventory and sales data from other stores. If the customer wants more well than they will have to buy Retail Management and Headquarters” regards Ryan ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the ...

making a transfer show up in the budget
Hi all. I am running MS money 2006. How do I make a transfer show up in my budget? I have several liabilities and credit cards, and I would like to make a budget with the monthly amount owed to each creditor showing up in my budget. The MS Money 2006 standard program does not allow me, as far as I can tell, to make a monthly transfer to a credit card or liability show up in my budget, unless I make it a category. Any help with this is much appreciated. thanks See http://umpmfaq.info/faqdb.php?q=124 for the short answer. You may be more interested in "cash flow" than &qu...

how to get position of cursor in EDIT control??
How does one get the position of the cursor in an edit control? I am not talking about the mouse cursor and that is what GetCaretPos() and GetCursorPos() do. I am talking about the blinking vertical line. There doesn't seem to be any way to get it?? I want to be able to get it in client or screen coordinates. Thanks! "Nobody" <nobody@cox.net> wrote in message news:dpbwb.10587$Bk1.14@fed1read05... > How does one get the position of the cursor in an edit control? I am not > talking about the mouse cursor and that is what GetCaretPos() and > GetCursorPos() do. I am...

making tickets
what is the best way to make numbered tickets using Publisher 2002? Hi lc (rconnell@numail.org), in the Microsoft Office Publisher newsgroup you posted: || what is the best way to make numbered tickets using || Publisher 2002? Check out the following link: http://www.mvps.org/publisher/numbering1.html -- Brian Kvalheim Microsoft Office Publisher MVP Official Publisher MVP Site: http://www.kvalheim.org This posting is provided "AS IS" with no warranties, and confers no rights. >-----Original Message----- >what is the best way to make numbered tickets using >Publi...

How make a favorite for all users in Ex2007/OWA/Documents area?
I am playing around with OWA in 2007 and exploring the "documents" feature of OWA that allows users to view Windows file shares by UNC. There is the individual "add to favories" option, but does anyone know of a way to administratively specify a favorite for all users? The alternative seems to be logon as each user to setup the same favorite--surely that is not the only way? Thanks for any help! Evan ...

Verifying number of records for upgrades/migrations
I have the following script from an MBS upgrade manual, which works great: Select name, rows from sysindexes where indid in (0,1) order by name However, we need to change our sort order to case-insensitive, according to the TK on CUstomersource using BCP. I have done this a couple times, but after you bcp the data out, then in, the number of records signicantly changes because the script is looking at the sysindexes table. Is there a script that we can run to look at the number of records within all user-defined tables, instead of the number of indexes? I don't feel comfortable...

Modification of Part Number (Revised)
I would like to add the string "1212" (no quotes) to some part numbers. Essentially, I have two versions of part numbers to modify: xxxxxxx(space)(space)xxxxxxxxxx(space)xxxxx(space)xxxx or xxxxxxxxxx(space)xxxxx(space)(space)xxxxxxx(space)xxxx(space)xxxx The length of the xxxxxx strings varies and represents alphanumeric characters that must remain unchanged. The string "1212" (no quotes) must always be appended to the first xxxxx string of alphanumeric characters. Thus the end result of the modification should be as follows: xxxxxxx1212(space)(space)xxxxxx...

AN OPPORTUNITY TO MAKE $$$
THIS REALLY WORKS IF YOU FOLLOW THROUGH!!! MAKE MONEY!!! MAKE MONEY!!! MAKE THOUSANDS OF "$$$" !!! I found this "NETWORKING PROJECT" on a bulletin board and decided to try it: All I say is, it "WORKS". All it takes is a small INVESTMENT of your "TIME" AND "less than $10.00"! INTERESTED??? E-mail: "spotty3443@yahoo.com" for DETAILS. ...

How do I make the X-Axis increase in scale with the quantity?
For example: If I have the values 1.5, 3.5, 8.7, 9.9 in the x values for a line graph, is there anyway to make them spaced apart so that they are in scale with eachother... Like so the distance between 3.5 and 8.7 is larger than, the distance between 1.5 and 3.5? Create a XY Scatter chart. It, and a bubble chart, are the only 2 that allow for cardinals values on the x axis. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <F2D3DC58-86D3-4D21-9D57-F704A78941FB@microsoft.com>, =?Utf- 8...

how do you make all incoming emails bold?
"Beth" <Beth@discussions.microsoft.com> wrote in message news:CD76AE42-9EC9-44C8-90FB-3A0566671AC4@microsoft.com... > I could've sworn there was a message here, but when I looked the body was completely blank. Oh well, guess the poster really didn't want to ask a question. how do you make all incoming emails bold? "Vanguard (NPI)" wrote: > "Beth" <Beth@discussions.microsoft.com> wrote in message > news:CD76AE42-9EC9-44C8-90FB-3A0566671AC4@microsoft.com... > > > > > I could've sworn there was a messag...

Sum of multiple numbers from query
I've got 3 fields that the user will put the numbers in I want to get a total of all 3 fields. field names: ReExp AvoidNumb AutoArousal total field: TotalPSS-SR need help how do I make the query work? Kim Add an additional field to your query: [TotalPSS-SR] = [ReExp] + [AvoidNumb] + [AutoArousal] "Kim T" wrote: > I've got 3 fields that the user will put the numbers in I want to get a total > of all 3 fields. > field names: > ReExp > AvoidNumb > AutoArousal > > total field: TotalPSS-SR > need help how do I make the query work? > Kim ...

How to make VLOOKUP work for this
I have a "master" spreadsheet where column A is a time column and every row represents a second (in plain text format) such as 00:00, 00:01, 00:02.... 00:59:, 01:00, 01:01, 01:02,... and continues on for 24 minutes... 23:59, 24:00. (1442 rows). Off to the side (I'm thinking of putting it on another sheet though) I have a small table where I'll enter the time and corresponding data I need populated in Column B, and will look something like the following example; My question(s) are, is the VLOOKUP function the best way to populate column B with the values? It's ...

Irregular formation of numbers #2
Thanks everyone for your responses.. it has made a complicated issue very simple.. Thanks agai -- Diamonell ----------------------------------------------------------------------- Diamonelle's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1275 View this thread: http://www.excelforum.com/showthread.php?threadid=24486 Diamonelle, Your gratitude is appreciated. I don't know what your question was originally. I thought I'd mention that this post seems to be an orphan. It appears you've posted it as a new post, rather than in the original thread, ...

Make Personal Calendar Read Only
I would like to make a users personal calendar read-only to the user. The individuals calendar is delegated to about 5 others and they need full access, but I do not want the end-user to have full access but read only. How do I go about changing these permissions? Thanks, Brian I don't believe that is even possible through the standard means, it is a little bizarre. You may be able to do it through a tool like ADSIEdit. Nue "HoosierDaddy" <bjorgenson@charter.net> wrote in message news:1139250053.396235.106790@o13g2000cwo.googlegroups.com... >I would like to make a...

How do I make more than 12 entries in excel balance sheet templat.
The excel balance sheet template is exactly what I need. How do I get it to expand to an infinite number of entries?? office xp ...

Numbers imported > then 15 digits
I'm importing data and one of my columns is 20 digit numbers, which can be text for my purposes. Excel is by default displaying them as (sample) 4.20043E+14 when the cell contains 420042784980703. I'de like to select th range of these cells and run a macro to convert them to text (display) as 420042784980703. If I manually press each on with the F2 key (entering edit mode) then simply pressing the enter key does it, But I have maybe 500 of these cells. How can I do this quickly? Tks In Advance.. If you're importing via File|open (or data|import external data), make sure you...

Is it Possible to make a table from a query without a Make Table Q
Is it possible to make a table with a query as the record source, without using a Make Table Query. The reason that I as is that I have a rather large database that I use to create tables for each day of the month based on activity recieved from a larger database. I use one Pass-Through query as the source for 31 Make Table queries. The reason I have done this is because I need to segregate the activity by date so that I can produce daily averages over the entire month. The reason that I have had to break each one per day is the Pass Through query is huge (returning 7,000,000 + rec...

Making a bmp transparent
Using Publisher 2000 Windows 98SE Is it possible to make a graphic file transparent? I'm attempting to create a motivational cartoon and would like to have a couple of scenes in the background. To do this I think I need to make an image file transparent. Can it be done? I have Paint Shop Pro and MS Paint. I have the challenge in the file, "Problem.zip" which can be downloaded at: http://www.tinyurl.com/wifs On the "Odds, Ends & Funny Things page. Click on the Snowman. 'Appreciate the help. -- Don -------- Vancouver, USA - One of the great cities in one of...

Check Digit calculation (IBAN)
Hi guys, I am trying to calculate check digits (Modulus 97 check) for an IBAN creation demo and am running in serious problems with Excel. First approach I tried is to use the MOD-function however this seems to be not possible using numbers with 18 digits. Next approach I tried is a "step by step" calcualtion however the Excel results are NOT correct when dividing numbers with 18 digits. E.g. 210005665660111000 / 97 = 2165006862475370.00 -> rcorrect result should be 2165006862475371.1340 Does anybody have any experience with this discrepancies or with check digit calcula...

How to make Frames??
how to make frames in microsoft publisher??? You use the Tool called TEXT FRAME Pretty easy I would have thought - obviously a challenge for some. -- i try to find in tool section.. but there is no button called TEXT FRAME? can u tell me the steps! PLZ!! Thankx.. and one more question.. i would link some sites... but i want that link(site) to be pop up in new window.? how to do it??? i've been trying to find it.. but then it always pop up in same window.. and could u tell me the steps?? plz. Thanzk Trust me, there is most definitely a button called Text Frame. Look in the HEL...

Excel 2007: Finding Column Position
Is there a formula that can look at a row of labels and return the columnar position of a designated value? For instance: Row A: Apples Oranges Pears Peaches How can I programmatically determine the column number for Pears? The end result is I am trying to do a VLOOKUP but the column number may be dynamic though the label will always be the same. Thanks, David Row 1 (not row A): =match("pears",1:1,0) will return the number of the column (if it finds a match) or an error (if there is no match). Debra Dalgleish has some samples that you may w...