How do i use VB script to change the length of a string in a serial number field Follow

0
Avatar
trevor callaghan

Hi all,

New to VB scripting in Bartender and I'm having trouble trying to apply some code to do the following

We have a serial number field that is 9 digits in length, i need to use the left function to only print the first 7 digits of this field.

We are getting the serial number from an Excel table using a database connection via a form that gets several fields as well as the serial number.

I'd like to be able to change the length of the string from the Excel file from 9 digits to 7 digits, thus only printing the first 7 numbers from the left.

I' am unsure of were to do this and the correct syntax of the code to use.

Some examples or pointers on were to start would be great.

thanks in advance

Trevor

 

2 comments

0
Avatar
Pete Thane
Comment actions Permalink

No need for VB you can just use one of the Transforms > Truncation settings

0
Avatar
trevor callaghan
Comment actions Permalink

Thanks for the fast reply, that's an excellent suggestion, I'll try it this morning.

 

regards

Trevor

Please sign in to leave a comment.