Web Development

General discussion


Problem with MS Access Code

By munrrob ·
I am trying to get a number as a result of a division in query builder but want to only show the whole number part of the result. The code I am using to do this is:

Wait in Months: Left([KDays]/30.41,(InStr(1,CStr([KDays]/30.41),".")-1))

but I get an invalid procedure call error. Can anyone tell me the correct syntax?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by iht4 In reply to Problem with MS Access Co ...

Use the Round Function

Returns a number rounded to a specified number of decimal places.

Round(expression [,numdecimalplaces])


Round(Left([KDays]/30.41,(InStr(1,CStr([KDays]/30.41),".")-1)) ,0)

hope this helps

Collapse -

by munrrob In reply to

Poster rated this answer.

Collapse -

by munrrob In reply to Problem with MS Access Co ...

This question was closed by the author

Related Discussions

Related Forums