Results 1 to 4 of 4
  1. #1
    greek-autumn is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    2

    Positive to Negative


    I am a novice database builder only because I had to become one for work. So please bare with me in my lack of knowledge. I'm sure someone has run into this before so I'm hoping someone can help me out.

    I am trying to convert a currency field from a positive number to a negative number, but the determinate on if it needs to change to a negative is based on the entry in another field. I have a field called DocBal and another field called DocType. If the DocType is "AD" then the DocBal value needs to be negative. If the DocType is anything else then the DocBal needs to stay positive.

    I've tried an IIF statement, but it isn't working.

    Any help would be greatly appreciated.

    Thanks!

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    You could create a new text box in your form and set its Control Source property to:
    = IIf([DocType]="AD",-1*[DocBal],[DocBal])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    greek-autumn is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    2
    Thanks Bob!

    This worked like a dream. I thought I had tried every combination of the formula that I could to make it work, but I guess not.

    Thanks again!

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Alternatively, you could use the given expression in the forms query.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting negative number to positive using QBE??
    By shabbaranks in forum Queries
    Replies: 5
    Last Post: 03-23-2012, 08:57 AM
  2. Converting Positive to Negative
    By TheProfessorIII in forum Access
    Replies: 5
    Last Post: 03-22-2011, 06:38 AM
  3. Summing Positive and Negative Currency
    By nweird in forum Reports
    Replies: 1
    Last Post: 07-22-2010, 10:05 AM
  4. Convert Negative Values to Positive
    By creativefusion in forum Queries
    Replies: 1
    Last Post: 10-21-2009, 02:47 AM
  5. Matching positive with negative amounts
    By cwert11 in forum Access
    Replies: 1
    Last Post: 09-29-2008, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums