My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
Posts: 3 Joined: 11-May 15 ![]() | Hello All! Great info on this site. I have a very specific request for some help in Crystal. I'm no expert, not even close, I took a 2 day class about a month ago. What I have is an MS database that has a mutliple line (paragraph) field. It's the description of a part number. Some have several lines, some have 1. What I need, in order to format it correctly to import it our new ERP program is for each line of the paragraph to be numbered, starting with a new sequence for each part number. For instance. PART1234-A this is the description for this part number, it could contain a space in it as above this is the end of the description PART546-344 This is a single line description for this part The Above example would have to look like this: PART1234-A 000001this is the description for PART1234-A 000002this part number, it could PART1234-A 000003 PART1234-A 000004contain a space in it as above PART1234-A 000005this is the end of the description PART546-344 000001This is a single line description for this part Is this possible? Thanks in advance |
![]() Post#2 | |
Posts: 3 Joined: 11-May 15 ![]() | I apologize, I didn't see any option to edit my post. My formatting didn't come across as it was in my text editing window. The Part number is in it's own field, the description of the part is in another field. I'm going to give the an example of my raw data again: PART1234-A this part number, it could __________ contain a space in it as above __________ this is the end of the description PART546-344 This is a single line description for this part **please ignore the white font, that's the only way I could get it to format correctly |
![]() Post#3 | |
![]() UA Admin Posts: 36,181 Joined: 20-June 02 From: Newcastle, WA ![]() | You can, I believe, use the Split() function to put the different lines into a array, from which you can then extract is part as an Indexed element of the array. However, without trying this I'm not sure you can use the line breaks, so this is untested. Dim I as Integer Dim strPartNumber() As String strPartNumber() = Split (strFieldContaingPartNumbers, vbcrlf) For I = 0 to UBound(strPartNumber()) Debug.Print I+1 & " " & strPartNumber(I) Next i |
![]() Post#4 | |
Posts: 3 Joined: 11-May 15 ![]() | Thanks for the reply, forgive my ignorance, but can you tell me; does this need to be a Formula Field, or a formula inside format editor my Description in details? |
![]() Post#5 | |
![]() UA Admin Posts: 36,181 Joined: 20-June 02 From: Newcastle, WA ![]() | Create it as a VBA Function. Use that function to update the contents of the field with the line numbers. I suspect you might need more specific instruction, so let |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 10th December 2019 - 09:36 PM |