Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2002
    Posts
    5

    Question Unanswered: functions problem in queries access 2k - winNT4

    Ok,
    I'm a bit lost here so maybe someone could help me out.
    I designed a query that used the LEFT string function to grab the first letter of someone's name EG:

    [title]+" "+left([firstname],1)+" "+[surname]

    This worked fine.

    Now running the query in that mdb on someone elses machine I got the following error:

    Function Isn't Available in Expressions in Query Expression

    I tried to fix that using the article in MS knowledge base at:
    http://support.microsoft.com/default...;EN-US;q194374

    That got rid of the error message but now I'm stuck with this one instead:

    Undefined function 'left' in expression

    Any idea how I fix this???

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    Check references in your database. Do you have missing ones?

  3. #3
    Join Date
    Mar 2002
    Posts
    5
    Ahh, you've just reached the limit of my knowledge.
    I haven't a clue what you're on about - sorry.
    Could you explain further.

    How do I check references?

    Surely string functions like Left, Length or Mid are main parts of the language? no?

  4. #4
    Join Date
    Feb 2002
    Location
    Sweden
    Posts
    34
    try to swith the comma "," to a ";"
    - Jonte

  5. #5
    Join Date
    Nov 2001
    Posts
    336
    In order to check references:

    1. on menu bar choose: View | Code
    2. on menu bar choose: Tools | References
    3. check for missing ones.

  6. #6
    Join Date
    Mar 2002
    Posts
    5
    OK, I'm getting there.
    Thanks to IGelin I now know where the references are.

    How do I work out which ones should be ticked?

    i.e. which one holds the left and trim functions?

    Sorry to be a pain.


  7. #7
    Join Date
    Nov 2001
    Posts
    336
    I beleive that "Visual Basic for Applications."
    Your main concern should be that you don't have any ticked references beginning with word MISSING.

    HTH

  8. #8
    Join Date
    Mar 2002
    Posts
    5

    Exclamation

    OK,
    None have the word MISSING however there there is a "Visual Basic for Applications" ticked plus 5 other intems unticked with the same name lower down.

    If I try to tick any of the others it tells me "the name conflicts with an existing module" and I can't untick the one at the top because it tells me it's in use.

    Lastly (I don't know if this is any help but),
    Each instance of "Visual Basic for Applications" diplays a different location at the bottom of the dialog box. They are all DLL's or OLB's

    Anyone got a clue what's going on here
    or more importantly how do it fix it?

    <wimper>

  9. #9
    Join Date
    Apr 2002
    Location
    Portugal
    Posts
    146
    HI!

    In the references chose one of those marked, (installed), not the visual basic, chose other look well at the name of the reference. Close the module. Open the module again, goto the references again and click on the reference that you leave unmarked.

Posting Permissions

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