[AccessD] Asterix

Gustav Brock gustav at cactus.dk
Sun Feb 26 10:11:38 CST 2012


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