matrix2004
Technical User
I inserted the following code into a VB Module to truncate a calculated value to two decimal places. The calculation works fine on my machine but is slightly different on another machine which is located offsite. There are thirteen other offsite centers -- their values agree with mine. The visual basic version number of the one offsite problem location is different than mine but it agrees with the other thirteen offsite centers VB version numbers which I am not encountering any problems with. The object libraries are the same as mine. Regional and Language options computer settings are also the same as mine. Any other ideas?
Public Function Floor(ByVal X As Double, Optional ByVal Factor As Double = 1) As Double
' X is the value you want to round
' is the multiple to which you want to round
Floor = Int(X / Factor) * Factor
End Function
I use the Floor function in various places (queries) which calculated the difference between clock in and clock out. Specifically, I used,
=Floor((DateDiff("n",[TimeOut],[TimeIn])*-1)/60,0.01)
Tanya
Public Function Floor(ByVal X As Double, Optional ByVal Factor As Double = 1) As Double
' X is the value you want to round
' is the multiple to which you want to round
Floor = Int(X / Factor) * Factor
End Function
I use the Floor function in various places (queries) which calculated the difference between clock in and clock out. Specifically, I used,
=Floor((DateDiff("n",[TimeOut],[TimeIn])*-1)/60,0.01)
Tanya