Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

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.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page