Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2006
    Posts
    56

    Unanswered: ACC97: Left() Function Not working in VBA

    Hello,

    Just wondering if anyone has run across this issue before. I am extracting a directory path from a string and I am using the Left() function. Not sure why, but it has quit working properly in the application. Other modules where I use the function continue to work fine. Heck, even the help file example isn't working. Has anyone run across this error before?

    Thanks,

    John

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What happens exactly?

    Can you do simple things like "left("test string", 3)" in your intermediate window? Is it throwing errors or just behaving other than expected?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2006
    Posts
    56
    Hi Teddy,

    Thanks for the info. Unfortunately no, I can't execute the Left() function even in its most basic form. I keep getting compile error: wrong number of arguements.

    When I switch to using the Right() function which is similar, it works fine.

    Thanks,

    John

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Have you tried the ol' "compact and repair" as well as resetting the reference to your Access object library?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Feb 2006
    Posts
    56
    Yep. That was the first and second thing that I did. Maybe Bill Gates is mad at me because the logo that I designed for this particular application includes the following: Microsofa... where do you want to sit today?

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    and if you make a brand new database, completely empty.

    Ctrl-G (exposes the immediate window)

    type:
    ? left(123,1)
    and hit return

    and then type:
    ? left$("test", 1)
    and hit return

    you should see 1 and t

    what happens?


    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Feb 2006
    Posts
    56
    Hi, I fixed the issue. I went through and released/re-added the references in the database. Not sure why, but the reference to the MS Office 11.0 Object library seems to have been the culprit.

    Thanks everyone, I really appreciate it. I can't wait until this organization can upgrade to 2003. I think that will eliminate a number of issues that they have been having.

    Thanks again to Teddy and Izy!

    John

  8. #8
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I can't find the exact article I was reading, but this one probably why you are having problems. Check out the Causes section.

    http://support.microsoft.com/?kbid=194374

    More than likely it is versioning issues.

Posting Permissions

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