Round function

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
 
N

Nikos Yannacopoulos

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
 
G

Gary Walter

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
 
G

Gary Walter

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
 
Top