Need to know how to enter an expression using the mround function

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

Guest

I have entered an expression in a query that calculates a number based on
information in a table. Here is the expression:

Expr1: [2007 Owner Pricing]![2007 1ch HS]*1.29+70

I need the value to display to the nearest 10 in the datasheet view (i.e.
instead of $4,585 round it to $4,590). I can't seem to get this to work by
using the mround function. Any help would be greatly appreciated!
 
Ha! Ha! Ha! This query expression is so ugly that it cracks me up. Hopefully
a coder will write you a nice function that does it much more elegantly.

Expr1: IIf(Right(CLng([2007 Owner Pricing]![2007 1ch
HS]*1.29),1)<5,CLng([2007 Owner Pricing]![2007 1ch HS]*1.29)-Right(CLng([2007
Owner Pricing]![2007 1ch HS]*1.29),1)+70,CLng([2007 Owner Pricing]![2007 1ch
HS]*1.29)+(10-Right(CLng([2007 Owner Pricing]![2007 1ch HS]*1.29),1)+70))

Now what doesn't crack me up is the 2007 in your table and field names.
Hopefully we aren't seeing one of those bad "database for each year"
implementations.
 
Back
Top