Trim Numbers

Crilen007

Uhm, Title... *shrug*
Local time
Today, 10:02
Joined
Jun 13, 2003
Messages
531
Tried to search for this, maybe I am searching the wrong term.

Anyways.. I have a table linked from a large mainframe, and what I am trying to do is trim any numbers that are 1 million and over, and still keep it a number.

Currently I have this:

VEHICLE_KMS2: IIf([VEHICLE_KMS]>999999,Left([VEHICLE_KMS],6),[VEHICLE_KMS])

What I need is to have it remain as a number, seems that the left function turns it into a string value.

Thanks
 
Just a quick thought, why not divide the number by 10 or 100 in your calculation.
 
Changing to string and back should work as well :)

VEHICLE_KMS2: IIf([VEHICLE_KMS]>999999,clng(Left(cstr([VEHICLE_KMS]),6)),[VEHICLE_KMS])

Peter
 

Users who are viewing this thread

Back
Top Bottom