how do I get rid of the trailing zero's from being displayed | Newbie | | Join Date: Aug 2009
Posts: 6
| |
The query function is: - 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
| |
best answer - posted by NeoPa |
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 : - SCHEDULE BBLS: Format(IIf([BOTTLE SIZE]=11.2,[SCHEDULE CASES]/14.77,0),'###00.00')
|  | Administrator | | Join Date: Oct 2006 Location: London - UK
Posts: 15,730
| | | re: how do I get rid of the trailing zero's from being displayed
I would say to move the penultimate parenthesis left two positions.
What you want is : - SCHEDULE BBLS: IIf([BOTTLE SIZE]=11.2,Format([SCHEDULE CASES]/14.77,'###00.00'),0)
Welcome to Bytes!
| | Newbie | | Join Date: Aug 2009
Posts: 6
| | | re: how do I get rid of the trailing zero's from being displayed
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
|  | Administrator | | Join Date: Oct 2006 Location: London - UK
Posts: 15,730
| | | re: how do I get rid of the trailing zero's from being displayed
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 : - SCHEDULE BBLS: Format(IIf([BOTTLE SIZE]=11.2,[SCHEDULE CASES]/14.77,0),'###00.00')
| | Newbie | | Join Date: Aug 2009
Posts: 6
| | | re: how do I get rid of the trailing zero's from being displayed
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
|  | Administrator | | Join Date: Oct 2006 Location: London - UK
Posts: 15,730
| | | re: how do I get rid of the trailing zero's from being displayed Quote:
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.
| | Newbie | | Join Date: Aug 2009
Posts: 6
| | | re: how do I get rid of the trailing zero's from being displayed
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
|  | Administrator | | Join Date: Oct 2006 Location: London - UK
Posts: 15,730
| | | re: how do I get rid of the trailing zero's from being displayed
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.
|  | Similar Microsoft Access / VBA bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,501 network members.
|