I need code to put in an Access VBA script to paginate a memo field. ? The routine will need to read in a memo field and add a hard carriage return "<BR>" every 60 characters (or less if the 60th character is not a space) and output the field back into a query or table.
## Deliverables
Pseudo code follows:
Input Table1, RecordID, Field1?
Read in 60 characters of Field1, is 61st character a space, if yes then add output 60 characters + <BR> to Field2
Read next block of 60 characters from the <BR>, is 61st characters a space, if yes output 60 characters + <BR> append to Field2?
Do until end of field is reached.
Output Table1, RecordID, Field2
Example:
Original Memo Field
Well respected 4-person Surgical Group seeks a General Surgeon to replace the senior partner who recently retired. General Surgeons with laparoscopic skills and Surgical Oncologists, who desire to do General and Oncologic Surgery are welcome to respond.?
You will enjoy a large practice and referral base, outstanding hospital facilities, and excellent financial rewards. 4.5 day work week. Very competitive salary, bonus, and full benefits are offered.
Output Memo Field with breaks at 60 chrs or at the space before 60 characters. ? Note that if there is a hard carriage return in the memo field the count restarts at the next alphanumeric character.
Well respected 4-person Surgical Group seeks a General<BR>?
Surgeon to replace the senior partner who recently retired.<BR>?
General Surgeons with laparoscopic skills and Surgical<BR>?
Oncologists, who desire to do General and Oncologic Surgery<BR>?
are welcome to respond.?
You will enjoy a large practice and? referral base,<BR>
outstanding hospital facilities, and? excellent financial<BR>?
rewards. 4.5 day work week. Very? competitive salary, bonus,<BR>
and full benefits are offered.