General discussion

Locked

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.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

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

Use the Round Function

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

Syntax
Round(expression [,numdecimalplaces])

i.e.

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

hope this helps
Iain

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

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums