Control Source syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field declared currency decimal value 2 places.
I need the field to produce the following value so that I don't have 4
digits after the decimal:

Int([SumOfRentTax]*100+0.5)/100

I get #Error in the field when I try to run the report.

What is the proper syntax?
I have tried:
=Int([SumOfRentTax]*100+0.5)/100
and
=Int([SumOfRentTax]*100+0.5)/"100"
and
Int([SumOfRentTax]*100+0.5)/100

TIA,
Cindy
 
Try this:
=Int(SumOfRentTax*100+0.5)/100

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
=Int([SumOfRentTax]*100+0.5)/100
should work as long as the control is not named with the name of a field in
the report's record source.
 
clouthomas,
Try this...

= INT((([SumOfRentTax]*100)+0.5)/100)

If that doesn't work, then provide an explanation of the calculation, with sample
values, and expected results.
The way you indicated the calculation, there are several ways to interpret how it
should work.
 
Thanks to all,
Duane hit the nail on the head - I was using the control as the name of a
field in the record source. I added another field and now the calculation
works correctly.

Thanks again,
Cindy



Duane Hookom said:
=Int([SumOfRentTax]*100+0.5)/100
should work as long as the control is not named with the name of a field in
the report's record source.

--
Duane Hookom
MS Access MVP

clouthomas said:
I have a field declared currency decimal value 2 places.
I need the field to produce the following value so that I don't have 4
digits after the decimal:

Int([SumOfRentTax]*100+0.5)/100

I get #Error in the field when I try to run the report.

What is the proper syntax?
I have tried:
=Int([SumOfRentTax]*100+0.5)/100
and
=Int([SumOfRentTax]*100+0.5)/"100"
and
Int([SumOfRentTax]*100+0.5)/100

TIA,
Cindy
 
Back
Top