I have a currency field that needs to be rounded up to the nearest dollar in a form. For example, because of some math used to calculate the field (the calculation is written to the field, it is not a calculated field), I might end up with $99.97 and I want it to show $100. I tried this syntax on the textbox and am getting #error: ControlSource = Round([MnthAmt], 0).
Is this perhaps because it is currency and not a number? In which case could I have this field be a number and then format it to look like currency in the display? Is there a rounding function for currency?
Thanks
Peter
using round function
-
- StarLounger
- Posts: 72
- Joined: 10 Feb 2010, 15:45
- Location: Kitchener, Ontario
using round function
Peter N
-
- StarLounger
- Posts: 72
- Joined: 10 Feb 2010, 15:45
- Location: Kitchener, Ontario
Re: using round function
Never mind. I just set the decimal places on the textbox to 0 and that solved the problem. Duh!
Peter N
-
- Administrator
- Posts: 78481
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: using round function
Keep in mind that if you set decimal places to 0, this only affects the displayed value, not the stored value. If you need to perform further calculations, you may want to round the stored value.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 72
- Joined: 10 Feb 2010, 15:45
- Location: Kitchener, Ontario
Re: using round function
That is not an issue but helpful to know. This is for an estimate based on weekly vs monthly amounts. They can be calculated in either direction (the donor says weekly and we calc monthly or vice versa) which is where the funny cent amounts are coming from. These are showing for display purposes and general budgeting numbers.
Peter N