Mike and Doris Manning
mikedorism at ntelos.net
Tue Jul 8 10:10:24 CDT 2003
You could loop through the string checking for the "-" character and whittling it down. When there are no more, then the reference number will be the numeric value of what's left. strWhittle = "ADTS - Outpatient Program Admission And Discharge Criteria - PPM No. 51.08 Human Resources Plan -- A15.04 Medical Staff Rules & Regulations - A10.03 Admission Criteria for Inpatient Hospitalization - PPM No. 25.07" Do While Instr(1, strWhittle, "-") > 0 intPos = Instr(1, strWhittle, "-") + 1 strWhittle = right(strwhittle, len(strwhittle) - intPos Loop RefNum = val(strwhittle) Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dwylene Garcia Sent: Tuesday, July 08, 2003 10:10 AM To: AccessD at databaseadvisors.com Subject: [AccessD] Split Field I have the following type of information in one field: ADTS - Outpatient Program Admission And Discharge Criteria - PPM No. 51.08 Human Resources Plan -- A15.04 Medical Staff Rules & Regulations - A10.03 Admission Criteria for Inpatient Hospitalization - PPM No. 25.07 I would like to split it so the reference number at the end of the field is in a separate field. The problem is, the number of spaces is not consistent. Can I work off the "-" somehow? Dwylene Garcia _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com