Rounding Up in a Query

T

Tandy

I am making a query where I times a field from a table (Annual Salary)
by 1.5 to get a base. How do I get it to round up to the nearest 1,000.

Thanks!
 
V

Van T. Dinh

Do you mean rounding to the nearest 1000 or round UP to the multiple of 1000
that greater than the result?

If it is the former case, try:

(CInt([YourField] * 1.5 / 1000)) * 1000


If it is the later case, try:

- (Int(-[YourField] * 1.5 / 1000)) * 1000
 
T

Tandy

Van T Dinh,

I meant rounding up to the multiple of 1000 that is greater than the
result. Thank you for the formula. I really appreciate the help!

Van T. Dinh said:
Do you mean rounding to the nearest 1000 or round UP to the multiple of 1000
that greater than the result?

If it is the former case, try:

(CInt([YourField] * 1.5 / 1000)) * 1000


If it is the later case, try:

- (Int(-[YourField] * 1.5 / 1000)) * 1000

--
HTH
Van T. Dinh
MVP (Access)


Tandy said:
I am making a query where I times a field from a table (Annual Salary)
by 1.5 to get a base. How do I get it to round up to the nearest 1,000.

Thanks!
 
Top