Results 1 to 6 of 6

Thread: ISTNR

  1. #1
    simon
    Guest

    ISTNR

    Hi all,
    I've been told to use this command in a query, for an access 2000 database. The database it's self is more of a template to detect rude words in records and then display each record through a form for deletion.

    The problem how ever is that the database will only find 100% swear words like F**K and not made up ones like F**kery, if you catch my drift. So I have to figure a way to get it to find such words and as yet have run out of ideas, so I called a good work associate who informed me that I could do it by using an ISTNR command and I have no idea how to since MS help isn't really that user friendly.

    Cheers,

    simon

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Location
    Yorkshire, England
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ISTNR

    did he by chance mean the InStr function?

  3. #3
    simon
    Guest

    Re: ISTNR

    more than likely I only talked to him over the phone so I didn't really check with him,

    could you give me some info on how to use the inStr function ?

    Cheers,

    simon

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ISTNR

    From Access 97 help:

    Returns a Variant (Long) specifying the position of the first occurrence of one string within another.

    Syntax

    InStr([start, ]string1, string2[, compare])

    The InStr function syntax has these arguments:

    Part Description
    start Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. If start contains Null, an error occurs. The start argument is required if compare is specified.
    string1 Required. String expression being searched.
    string2 Required. String expression sought.
    compare Optional. Specifies the type of string comparison. The compare argument can be omitted, or it can be 0, 1or 2. Specify 0 (default) to perform a binary comparison. Specify 1 to perform a textual, noncase-sensitive comparison. For Microsoft Access only, specify 2 to perform a comparison based on information contained in your database. If compare is Null, an error occurs. If compare is omitted, the Option Compare setting determines the type of comparison.
    Return Values

    If InStr returns
    string1 is zero-length 0
    string1 is Null Null
    string2 is zero-length start
    string2 is Null Null
    string2 is not found 0
    string2 is found within string1 Position at which match is found
    start > string2 0
    Remarks

    The InStrB function is used with byte data contained in a string. Instead of returning the character position of the first occurrence of one string within another, InStrB returns the byte position.

  5. #5
    simon
    Guest

    Re: ISTNR

    cheers [img]/forums/images/smilies/wink.gif[/img]

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ISTNR

    You can catch swear words that have prefixes or suffixes (what I think you were getting at with F**kery) by simply not including leading and trailing blanks in your search terms. HOWEVER, if you do so you will occasionally see false positives (i.e. words that aren't swear words but that just happen to have "naughty letters" within them). I don't recall examples, but there have been a few cases mentioned in the comp.risks newsgroup that involved going overboard with swear word checking. There's also cases where a swear word isn't a swear word in certain contexts, e.g. "b i t c h". (I do believe Woody's Lounge is doing some censoring, judging from what happened when I entered that word without spaces!)

    As long as you're manually checking the records that your program flags you're probably all right, but I wouldn't try to automate the record deletion! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •