Vb Script To Read Only The First 2 Line Of A Memo Field. Follow
I'm creating a lable that extracts data from the DB in a memo field that has multilpe lines of data.
I just need to read and display the first 2 line from that field.
Thanks.
3 comments
Have you tried using the "Truncation" transform to discard the characters of data that you don't want? Are the "lines of data" marked by a fixed character length, or a carriage return and line feed?
I have used trancation, and it does not work for all the data.
The data in the memo field may have several lines and I wanted to only pull out the first 2 lines.
They are not of a fixed lenght. They do have carriage return after each line.
Then use a VB script to find the position in the string of the second carriage return Chr(13) using the InStr() function, and then use the Left() function to set the value of the data source as being only everything to the left of that position value.
Please sign in to leave a comment.