View Full Version : truncate text field automatically


russi
04-24-2001, 07:42 PM
Hi. I have a primary key field called VendorID. It is variable-sized text field.
I have a filed called Vendor that is supposed to be the Vendor name minus the 2-digit suffix given at VendorID.

How do I word the after Update of VendorID so that Vendor is the same, but minus the last 2 digits?

Russ

DES
04-25-2001, 05:17 AM
Dim vLengthOfString

vLengthOfString = Len(VenderID)-2
Me![Vendor] = Left[VenderID, vLengthOfString)

russi
04-25-2001, 06:02 AM
Thank you! Thank you! Thank you!

I can't tell how (out of embarassment) how much time I have spent on this.

Russ