[AccessD] Asterix

Gustav Brock gustav at cactus.dk
Sun Feb 26 11:12:34 CST 2012


Hi Tony

Ah,I see. We all have our favourites.

/gustav


>>> TSeptav at uniserve.com 26-02-12 17:12 >>>
Hey Gustav
Part of the famous variable string quartet
Brimbo, Glimbo, Timbo and Zimbo. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Sunday, February 26, 2012 8:12 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Asterix

Hi Tony

Zimbo??

/gustav


>>> TSeptav at uniserve.com 26-02-12 16:35 >>>
Hey All
Some code that may help. Didn't want to try writing tons of code for all the
reserved words, so I use this code, nothing fancy by any means but it seems
to be working fine. Except for multiple asterixs. Search for everything
containing *** and it returns **a, ***b, ****d, *e*, ***f*** etc. Not a
biggy because I can see the asterixs. Also I am getting tired of fooling
around with this thing.
 
If Mysearch=1 ..........Starts With
If Len(Me!MyPhrase = 1 Then 
    Zimbo = "[" & Left(Me!MyPhrase, 1) & "]" & "*"
Else
    If Len(Me!MyPhrase) = 2 Then
        Zimbo = "[" & Left(Me!MyPhrase, 1) & "]" & "[" & right(Me!MyPhrase, 1) & "*"
    Else
        Zimbo =  "[" & Left(Me!MyPhrase, 1) & "]" & Mid(Me!MyPhrase, 2, Len(Mid(Me!MyPhrase, 2)) - 1) & "[" & Right(Me!MyPhrase, 1) & "]" & "*"
else .........Contains
If Len(Me!MyPhrase = 1 Then 
    Zimbo ="* & "[" & Left(Me!MyPhrase, 1) & "]" & "*"
Else
    If Len(Me!MyPhrase) = 2 Then
        Zimbo ="*" & "[" & Left(Me!MyPhrase, 1) & "]" & "[" & right(Me!MyPhrase, 1) & "*"
    Else
        Zimbo ="*" &  "[" & Left(Me!MyPhrase, 1) & "]" & Mid(Me!MyPhrase, 2, Len(Mid(Me!MyPhrase, 2)) - 1) & "[" & Right(Me!MyPhrase, 1) & "]" & "*"
End If
MyWord = Zimbo



More information about the AccessD mailing list