Round function

  • Thread starter Thread starter Emmy
  • Start date Start date
E

Emmy

Hello,

I have an update query that needs to round a field down
to the nearest thousand. I couldn't find any examples in
help. Does anyone know if this can be done?

Thanks!!
Emmy
 
Emmy,

Assuming Field1 is the name of the field to be rounded down, the expression
for the calculated field would be:

[Field1] - ([Field1] Mod 1000)

HTH,
Nikos
 
I have an update query that needs to round a field down
to the nearest thousand. I couldn't find any examples in
help. Does anyone know if this can be done?
Hi Emmy,

One other option might be:

UPDATE [floatfield]
SET [floatfield]=Int(CDec([floatfield])/CDec(.001) +0.5)*.001
 
of course some people might try
updating a *table*......

UPDATE [yourtable]
SET [floatfield]=Int(CDec([floatfield])/CDec(.001) +0.5)*.001

I have an update query that needs to round a field down
to the nearest thousand. I couldn't find any examples in
help. Does anyone know if this can be done?
Hi Emmy,

One other option might be:

UPDATE [floatfield]
SET [floatfield]=Int(CDec([floatfield])/CDec(.001) +0.5)*.001
 
Back
Top