Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2002
    Location
    London
    Posts
    73

    Unanswered: Error Left$ in ms access query

    Hi can anyone help me. I am trying to run a query which in the past it has run. Somebody else built this query so i'm a bit confused. Below is the expression
    Location: [Left$]([SM_LOCATION],1) & [Right$]([SM_LOCATION],LEN$([SM_LOCATION])-1)

    Error message is comming "Undefined function [Left$] in expression.

    I do not understand the error message. Please can you help

    thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Check your preferances, and uncheck the not found ones

  3. #3
    Join Date
    Jan 2002
    Location
    London
    Posts
    73
    Hi sorry but what do you mean by C"heck your preferances, and uncheck the not found ones"

    cheers

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    wazzat [Left$] stuff - if you have a database field named "Left$", change planet immediately.

    probably what you are looking for is:
    Location: Left$([SM_LOCATION],1) & Right$([SM_LOCATION], LEN$([SM_LOCATION])-1)
    ...but even this seems a dumb thing to do!

    left$("Xabcde", 1) = "X"
    right$("Xabcde", Len("Xabcde")-1) = "abcde"
    so the concatenation of the two returns "Xabcde"
    ...not the most profitable use of clock cycles.

    hmmmmmmm!

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    What I meant, just open any Module, click the tools Menu, choose preferences and see what for ones are checed. Perhaps you will find one called not found ..... or something like that, then uncheck this from the prferences list.

    Hope I could express.

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hammbakka:
    this is not a missing reference, it is just pointless code badly written.

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Once I had such error and I looked the preferance und unchecked the not found one, then it disappeared. Perhaps also it is due to something else.
    Thanks

Posting Permissions

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