John,
Sorry to bother you.
Along somewhat similar lines to this thread...
I have a simple query expression in Access 2003 of:
5-yr Ave Return decile: Int([5-yr Ave Return Cat Rank]/10)
When I run the query, it says,
"compile error in query expression 'Int([5-yr Ave Return Cat Rank]/10)'
If I try:
5-yr Ave Return decile: round([5-yr Ave Return Cat Rank]/10,0)
, I get a similar compile error.
Any help to tell me what I did wrong will be greatly appreciated.
Thanks!
John Spencer (MVP) said:
Change your division operator to \ vice /
The first will do INTEGER division which means it will drop the decimal portion.
You can also look at the Int or Fix function which also return the integer
portion of the number. If the number is negative then you should read the help
on the two functions to see which result you want returned.
Int((Now()-[Start date])/7)
QVCJDN wrote:
I need to round down an expression in a query, for example: Weeks Completed:
(Now()-[Start Date])/7 needs to return the next lowest whole number.