Format Decimal Places in Code - Easy I'm sure!

Elana

Registered User.
Local time
Yesterday, 17:37
Joined
Apr 19, 2000
Messages
232
I need to determine a pro-rata factor using the following code:

Dim intNodays as Integer
Dim Factor As Single
intNoDays = DateDiff("d", Me.CovEffDate, Me.ExpDate)

Factor = intNoDays / 365

My problem is that I need field Factor to be limited to 3 decimal places. I've tried several things, but nothing seems to work. I'm sure I'm missing something EASY.

Any help is much appreciated!
 
Try:

Factor = Format(intNoDays / 365,"0.0##)

HTH
RDH

[This message has been edited by R. Hicks (edited 09-27-2001).]
 
Thanks so much! I had tried Format previously, but I didn't have the syntax right.
 

Users who are viewing this thread

Back
Top Bottom