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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top