[AccessD] Find characters in one string that areinanother:w asRE: Treat string as array

Heenan, Lambert Lambert.Heenan at AIG.com
Tue Mar 25 11:14:28 CDT 2008


The fact that other people have trouble wrapping their heads around my first
name in no way induces me to change or shorten it. I'm quite happy with the
full deal.

I tolerate work colleagues calling me Lamb, but it's Lambert to the rest of
the world. :-)

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Tuesday, March 25, 2008 11:58 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Find characters in one string that areinanother:w
asRE: Treat string as array


 
>can't cope with the idea of "Lambert" as a first name. :-)

Have you thought of abbreviating it?

(Not Lamb, but Bert)

What does your Dad call you in the pub?

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
Sent: Tuesday, March 25, 2008 3:49 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Find characters in one string that areinanother:w
asRE: Treat string as array

Just for the record. "Heenan" is by surname. But don't worry about it, I've
forever coming across people who can't cope with the idea of "Lambert" as a
first name. :-)


Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Tuesday, March 25, 2008 11:35 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Find characters in one string that are inanother:w
asRE: Treat string as array


Well Heenan, that was well beyond the time when I had already just caved and
implemented the mid() solution.  I will be going back and rewriting using
Gustav's solution, I just haven't had the time yet.

The nice thing about this list is that so many people are willing to
respond, and I REALLY DO appreciate all responses, just want to get that
out.  I may grouse a bit but people are willing to take time and make
suggestions.  And of course we have so many keen minds that someone will
have the answer if there is one. 

Don't you agree that

Dim byArray() As Byte
Dim c As Variant
    byArray = StrConv(str, vbFromUnicode)
    For Each c In byArray()
        Debug.Print c; " "; Chr(c);
    Next c

Is just an elegant solution?  It may not be any faster than the mid() but is
sooooo much more readable.  Not to mention the fact that once it is in an
array you can do all kinds of comparisons on each element.


John W. Colby
Colby Consulting
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list