Numbers round up

Deb in LA

Registered User.
Local time
Today, 22:48
Joined
Apr 14, 2000
Messages
19
My text box has this in the control:
=IIf([transamt],Format(([balfwd]+Sum([transamt])),"#") & " DOLLARS AND " & Right((Format([balfwd]+Sum([transamt]),".00")),2) & " CENTS",Format([balfwd],"#") & " DOLLARS AND " & Right((Format([balfwd],".00")),2) & " CENTS")

When I test the report, the part where I'm using "#" to format, the number is rounding up. How do I stop that? I've tried abs and fix and int.

Thanks in advance
Deb
 
There's probably a better way to do this, but this is what I ended up doing :

=IIf([transamt],(Left([balfwd]+Sum([transamt]),(InStr(([balfwd]+Sum([transamt])),"."))-1)) & " DOLLARS AND " & Right((Format([balfwd]+Sum([transamt]),".00")),2) & " CENTS",(Left([balfwd],(InStr(([balfwd]),"."))-1)) & " DOLLARS AND " & Right((Format([balfwd],".00")),2) & " CENTS")


This will show:

1247 DOLLARS AND 85 CENTS

The amount is $1,247.85

It WAS doing this:

1248 DOLLARS AND 85 CENTS

So---let me know if anyone has a better solution than using instr then subtracting 1 then putting that into the left formatting string.

Deb
 

Users who are viewing this thread

Back
Top Bottom