• ISTNR

    • This topic has 5 replies, 4 voices, and was last updated 24 years ago.
    Author
    Topic
    #1768951

    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 **** and not made up ones like ****ery, 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

    Viewing 2 reply threads
    Author
    Replies
    • #1781455

      did he by chance mean the InStr function?

    • #1781456

      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

      • #1781460

        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.

    • #1781471

      You can catch swear words that have prefixes or suffixes (what I think you were getting at with *******) 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. (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!

    Viewing 2 reply threads
    Reply To: ISTNR

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: