Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Format in IIf

Discussion in 'Information Technology' started by F1stman, Jul 28, 2006.

Tags:
  1. F1stman

    F1stman
    Expand Collapse
    Guest

    Hello
    I am using IIf statements in a query to help me organize some data. The
    problem is once the info is sorted I can't get it to format correctly. I want
    to format numbers as currency. Thank you in advance for all of your generous
    efforts. This group is great.
     
  2. Loading...

    Similar Threads Forum Date
    India Indian ‘Journalist’ Slams Gurbaksh Singh Than Admits to Receiving Information from ‘Agencies’ Breaking News Dec 27, 2013
    Opinion West Punjab : Information Pool and Pictures Punjab, Punjabi, Punjabiyat Nov 18, 2013
    When Turban Turns Messenger Diaspora Finds Interesting Ways to Spread Information About Sikhi Sikh Youth Nov 10, 2013
    Story of Transformation Sikh Rehat Maryada Jul 27, 2012
    Sikhism Benti Chaupai - Keertan Format Videos Feb 11, 2012

  3. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    It should work

    IIF formulas dont change format but simply provide an answer if true and
    another if false

    Question: IIf([FieldName]="MS",0,[Cost])

    This would give an answer of 0 if FieldName = 0
    and insert the contents of field "Cost" if FieldName was not = MS

    You should ensure the field your are using is formated correctly in the base
    table and is not altered in the query

    Hope this helps



    "F1stman" wrote:

    > Hello
    > I am using IIf statements in a query to help me organize some data. The
    > problem is once the info is sorted I can't get it to format correctly. I want
    > to format numbers as currency. Thank you in advance for all of your generous
    > efforts. This group is great.
     
  4. F1stman

    F1stman
    Expand Collapse
    Guest

    How would I know if it was altered in the query? It is formatted as currency
    in source table. My IIf statement is
    IIf([Project Fund Source]=1,[Amount Appropriated], (" "))
    Any Clues? Will not show correctly in query window or new subform to display
    this data even though subform is formatted as well.

    "Wayne-in-Manchester" wrote:

    > It should work
    >
    > IIF formulas dont change format but simply provide an answer if true and
    > another if false
    >
    > Question: IIf([FieldName]="MS",0,[Cost])
    >
    > This would give an answer of 0 if FieldName = 0
    > and insert the contents of field "Cost" if FieldName was not = MS
    >
    > You should ensure the field your are using is formated correctly in the base
    > table and is not altered in the query
    >
    > Hope this helps
    >
    >
    >
    > "F1stman" wrote:
    >
    > > Hello
    > > I am using IIf statements in a query to help me organize some data. The
    > > problem is once the info is sorted I can't get it to format correctly. I want
    > > to format numbers as currency. Thank you in advance for all of your generous
    > > efforts. This group is great.
     
  5. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    ooops
    This would give an answer of 0 if FieldName = MS
     
  6. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    You HAVE converted it to text

    Should be

    IIf([Project Fund Source]=1,[Amount Appropriated], )

    Hope this helps




    "F1stman" wrote:

    > How would I know if it was altered in the query? It is formatted as currency
    > in source table. My IIf statement is
    > IIf([Project Fund Source]=1,[Amount Appropriated], (" "))
    > Any Clues? Will not show correctly in query window or new subform to display
    > this data even though subform is formatted as well.
    >
    > "Wayne-in-Manchester" wrote:
    >
    > > It should work
    > >
    > > IIF formulas dont change format but simply provide an answer if true and
    > > another if false
    > >
    > > Question: IIf([FieldName]="MS",0,[Cost])
    > >
    > > This would give an answer of 0 if FieldName = 0
    > > and insert the contents of field "Cost" if FieldName was not = MS
    > >
    > > You should ensure the field your are using is formated correctly in the base
    > > table and is not altered in the query
    > >
    > > Hope this helps
    > >
    > >
    > >
    > > "F1stman" wrote:
    > >
    > > > Hello
    > > > I am using IIf statements in a query to help me organize some data. The
    > > > problem is once the info is sorted I can't get it to format correctly. I want
    > > > to format numbers as currency. Thank you in advance for all of your generous
    > > > efforts. This group is great.
     

Share This Page