Separating a Two-Line Field into Two Fields This procedure will separate a two-line text field in your database into two separate fields to allow for better functionality when using Search/Update or Mail Merge. For example, your database may contain a two-line address field with the street address on one line and a suite number on the second line. To separate this two-line field, do the following: 1) Make sure that you have a backup of your database. 2) Redesign and add three new fields to your database: Two single-line fields, ADDR1 and ADDR2, and a two-line AUXILIARY field to contain a copy of your original two-line ADDRESS. 3) Use Mass Update to copy your ADDRESS field to the AUXILIARY field. To do this leave your Retrieve Spec blank, and complete your Update Spec as shown below: ADDRESS: #1 AUXILIARY: #3 = #1 4) You will now use macros to make two passes through your database. First to delete the second line in the ADDRESS field, and on the next pass to delete the first line in the AUXILIARY field. Following is an example of three separate yet "nested" macros, each of which are linked together in order to do one specific operation 1000 times. The first macro calls the second macro 10 times. The second macro calls the third macro 10 times. The third macro calls the fourth on 10 times, and the fourth macro does 1 operation. Hence we have 10 (to the third) x 1 or 1000 operations that are performed. * * * To create these macros choose Write from the Main Menu and then Type/Edit and type in the above macros. To save, press CTRL F8 and name the file TWOLINE.MAC. Q & A Application Note Rev. 6/92 #2107 Page 1 of 2 Separating a Two-Line Field into Two Fields Before using the macros you must press SHFT F2, type G to Get Macros and then enter the filename TWOLINE.MAC. To invoke the macros for the first pass through your database in order to delete the second line of the original ADDRESS field, go into Search/Update and press F10 at the Retrieve Spec. Position the cursor at the start of the ADDRESS field and press ALT A. Note: If your database has less than 1000 records, after the macros have reached the last record in your file you will notice a flashing, "No more forms" message. These same macros can be used during the second pass to delete the first line of the AUXILIARY field provided one change is made. Change the ALT X macro to read: 5) Mass Update again to copy the remnants of your original ADDRESS field to ADDR1 and those of AUXILIARY to ADDR2. To do this leave your Retrieve Spec blank, and complete your Update Spec as shown below: ADDRESS: #1 ADDR1: #2 = #1 ADDR2: #3 = #4 AUXILIARY: #4 Press F10. Q & A Application Note Rev. 6/92 #2107 Page 2 of 2