Hewson, Jim
JHewson at nciinc.com
Wed Jul 9 13:37:02 CDT 2008
Jurgen, Thanks, I was able to figure out the original email. This works well, but how do I get the text out of the immediate window? If I need to filter on the first part and then sort on the second or third, how can this be done? Thanks, Jim jhewson at nciinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz Sent: Wednesday, July 09, 2008 1:01 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Extract Strings from Long Test String Boy did that post get messed up. I'll try again: Sub getParts() Dim str As String str = "[LHDMSP]/[AN/FMQ-7]/[7361002-2]/[7361799]/[7361795]/[953]/[7953200]/[7953207]/[1N756A][LHDMSP]/[AN/FRR-95]/[317400]/[317359]/[624459]/[317298-1]/[PTM15-1.5D]/[235-7053P334][LH MWD]/[AN/FPS-123 (V)1]/[957157-1]/[953252-1]/[584786-1]/[STM5-24]/[586371-5][LH SCS]/[AN/FPS-85]/[2054300-0501]/[Receiver]/[No Number(F20)]/[2052660-0502]/[2018219-0501]/[2020306-0501]/[2055347-0506]/[2018880-0001]/[1N752A]" fnGetParts str End Sub Function fnGetParts(strIn As String) Dim lngI As Long Dim lngJ As Long Dim strTest As String strTest = strIn lngI = InStr(strTest, "[") Do While lngI strTest = Mid$(strTest, lngI + 1) lngJ = InStr(strTest, "]") Debug.Print Left$(strTest, lngJ - 1) lngI = InStr(strTest, "[") Loop End Function Ciao Jürgen Welz Edmonton, Alberta jwelz at hotmail.com ################################################################################ This email transmission contains information from NCI Information Systems, Inc. that may be considered privileged or confidential and is intended solely for the named recipient. If you have received this message in error, please contact the sender immediately and be aware that the use, copying or dissemination of this information is prohibited. ################################################################################