keepingbusy
Programmer
Hi All
I have a form that allows a user to paste information into a memo field, Example:
Dave Jones
21 Somewhere Avenue
The Greenacres
Evergreen District
Bristol
BS12 T67
I then use the following code in the click event of a command button to copy the above into seperate fields:
Most of the time there will be 7 lines of text in the memo field, but there could be anything between 5 and 8 lines.
If there isn't the exact 7 lines then an error message appears as in the thread title Subscript Outside Defined Range
Please can anyone suggest a method or way around this error?
Many thanks
Lee...
VisFox Version 6 User / Windows ME
I have a form that allows a user to paste information into a memo field, Example:
Dave Jones
21 Somewhere Avenue
The Greenacres
Evergreen District
Bristol
BS12 T67
I then use the following code in the click event of a command button to copy the above into seperate fields:
Code:
ALINES(aMyArray, ORDERTEXT)
REPLACE LINE01 WITH aMyArray(1)
REPLACE LINE02 WITH aMyArray(2)
REPLACE LINE03 WITH aMyArray(3)
REPLACE LINE04 WITH aMyArray(4)
REPLACE LINE05 WITH aMyArray(5)
REPLACE LINE06 WITH aMyArray(6)
REPLACE LINE07 WITH aMyArray(7)
Most of the time there will be 7 lines of text in the memo field, but there could be anything between 5 and 8 lines.
If there isn't the exact 7 lines then an error message appears as in the thread title Subscript Outside Defined Range
Please can anyone suggest a method or way around this error?
Many thanks
Lee...
VisFox Version 6 User / Windows ME