how do I get rid of the trailing zero's from being displayed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • toofunny24
    New Member
    • Aug 2009
    • 6

    #1

    how do I get rid of the trailing zero's from being displayed

    The query function is:
    Code:
    SCHEDULE BBLS: IIf([BOTTLE SIZE]=11.2,Format([SCHEDULE CASES]/14.77,"###00.00",0))
    The schedule cases amt in this case is 13600. The above formula produces 920.79000. How do I get rid of the trailing zero's?

    Thanks,

    Mike
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    I would say to move the penultimate parenthesis left two positions.

    What you want is :
    Code:
    SCHEDULE BBLS: IIf([BOTTLE SIZE]=11.2,Format([SCHEDULE CASES]/14.77,'###00.00'),0)
    Welcome to Bytes!

    Comment

    • toofunny24
      New Member
      • Aug 2009
      • 6

      #3
      Ok, I tried that and got 920.79 000 It just put spaces between the nine and the zero's.

      Why is it that when you create a calculated field in a query the format drop down is blank?

      Thanks for your help, let me know if have any more ideas on this.

      Mike

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        It doesn't matter if the dropdown is blank. They are only values to choose from. You can easily type in any valid format string and it will work.

        Alternatively, try :
        Code:
        SCHEDULE BBLS: Format(IIf([BOTTLE SIZE]=11.2,[SCHEDULE CASES]/14.77,0),'###00.00')

        Comment

        • toofunny24
          New Member
          • Aug 2009
          • 6

          #5
          I had about three iif statements trailing the one I provided thinking that it was the statement that was the problem and not the string. So, I took your original suggestion and then took out the additional iif statement behind it and the zero's disappeared. Next time I'll put the whole thing in cuz you guys know more than me.

          Thanks for your help,

          Mike

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32669

            #6
            Originally posted by toofunny24
            I had about three iif statements trailing the one I provided thinking that it was the statement that was the problem and not the string. ... Next time I'll put the whole thing in cuz you guys know more than me.
            Amen to that Mike ;) It's always good to have the whole story to work with. Sometimes it's hard to determine what is relevant though.

            As for the solution. I'd recommend the second (post #4) over the first.

            Comment

            • toofunny24
              New Member
              • Aug 2009
              • 6

              #7
              Maybe you can help me with something else. I created a report that is in a column format. The column shows different material amts used in a particular record and the report is grouped by contract name and only shows records for a particular date. I managed to fit all the fields I wanted in the column and the report shows each record side by side. My question is this, is there a way to put the totals for each row on the right side of the page?

              Thanks again

              Mike

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32669

                #8
                I will be happy to give it a try Mike, but you'll need to post in in its own thread.

                While you're about it, you may want to consider explaining it a little more fully. I have to say I wouldn't be able to help much from what you've posted here.

                Comment

                Working...