Drew Wutka
DWUTKA at Marlow.com
Thu Jan 28 11:53:36 CST 2010
Actually, that is not true Max, he didn't want to just parse a string. He wanted to parse a string TWICE. There is a distinction. If he had a string "[InvoiceNo]=12345", then he would have never gotten a class example from me, I would have simply said strArray()=Split(strWhatever,"=");strArray(1). Case closed. But he presented a string of multiple [Field]=Value items, which can be solved by two splits, but is much easier to use with a class/collection USING the Split statements. I did also preface my initial reply with a statement saying that he already had several GOOD working solutions, so I wasn't trying to shove a class solution down anyone's throat. And to answer your analogy of using a scientific calculator..... why buy a basic calculator when you already have a scientific one? Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, January 28, 2010 11:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] A2003:Replacing 'tokens' in a string I know Drew. Everything you say makes eminent sense - cannot argue with it. BUT Why buy a scientific calculator when all you want is the answer to arithmetic sums? That's the ONLY point I am making. What you (and John) are saying is all good stuff and worth listening to. No question. But he just wanted to parse a string...not rocket science. Thanks mucho Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 28 January 2010 17:14 To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003:Replacing 'tokens' in a string That's a good question Max, so here is a serious answer. First, class/collection code is more readily understandable by it's very nature. For example, let's take this thread's situation. If you were to look at a single line of code: Arr(i) Or Tk.TokenValue The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.