Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Missing Search Function (Access 2002)

    I have a table that contains names in the form of Last Name, First Name, and I want to create an expression that reverses the order to First Name Last Name with no comma.
    However, upon entering the function SEARCH(",", Name) I get the error message: "Undefined function SEARCH in expression". The Access Help feature lists SEARCH as a legitimate expression. Any ideas on why Access doesn't recognize it?

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

    Re: Missing Search Function (Access 2002)

    You may have a reference to the Excel object library, for SEARCH is an Excel worksheet function, not an Access function. You can use the InStr function in expressions in Access: InStr([Name],",") will return the position of the comma in the name.

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Missing Search Function (Access 2002)

    Thanks Hans,

    I believe I had both Access and Excel open at the time, so I suppose I picked up the SEARCH function from Excel.

    I'l try the InStr function in Access.

Posting Permissions

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