Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expression Builder (03)

    Is there a FIND function in the expression builder? I could not locate it.

    What I would like to do is something similar to an Excel formula: =Find("-",MyText) Where "MyText" = "01-436"

    The result would be 3.

    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expression Builder (03)

    Access uses the VBA function InStr. In your example, it would take the form InStr(MyText,"-")

    InStr can be used like this:

    InStr(string-to-look-in, string-to-look-for) returns the position of the first occurrence of string-to-look-for in string-to-look-in, or 0 if not found.

    InStr(start, string-to-look-in, string-to-look-for) returns the position of the first occurrence of string-to-look-for in string-to-look-in starting at position start, or 0 if not found

    InStr(string-to-look-in, string-to-look-for, comparison-mode) returns the position of the first occurrence of string-to-look-for in string-to-look-in, or 0 if not found. comparison-mode can be:
    0 (default): case-sensitive comparison ("A" is different from "a")
    1: case insensitive comparison ("A" is the same as "a", but different from "

Posting Permissions

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