Results 1 to 8 of 8

Thread: left() in sql

  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: left() in sql

    I run a qry select left(fname,5) from ....

    it runs fine my comp is xp pro, the db is on a network drive.
    My boss when he runs the qry (on win 2k same network db) he gets an error. becuase of the left. He allso gets other msg on things like having page of pages in a rept that works fine for me. What could the problem be? how can i fix it?

    how can u tell a database is corrupt?
    What can u do if your db is corrupt?

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    He may not that the same reference libraries that you have on this machine. Check to see if any of the libraries are missing

    s-

  3. #3
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Cool Left sql

    It might be worth de-referencing all the libraries (Tools - references - etc when you're looking at code), closing the database, opening it and rereferencing the libraries that you are using.

    To repair a corrupt database go to Tools-Database Utilities, repair and compact database (or compact and repair).

  4. #4
    Join Date
    Oct 2003
    Posts
    311
    im using access 2000, i dont see where i can check and or set my references, are u talking about in the vba module?


    If so the problem is ocurring with a qry that is not run from vba. His vba references were never changed since the db was created and i dont think my have either

  5. #5
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Left is a VBA command. If there are problems with your references then usually all VBA commands cannot be executed. What you want to do is open a module. If you don't have any, open a new one. In the toolbar you will see Tools, in the Tools choose the References it will show a whole list of library names. The ones that are checked are the ones that are being used by your database.

    My guess is when you go to your boss' machine you will see that one says MISSING next to it. Typically it is a third party control or another Access database that your boss' computer might not have access to.

  6. #6
    Join Date
    Oct 2003
    Posts
    311
    Originally posted by DCKunkle
    Left is a VBA command. If there are problems with your references then usually all VBA commands cannot be executed. What you want to do is open a module. If you don't have any, open a new one. In the toolbar you will see Tools, in the Tools choose the References it will show a whole list of library names. The ones that are checked are the ones that are being used by your database.

    My guess is when you go to your boss' machine you will see that one says MISSING next to it. Typically it is a third party control or another Access database that your boss' computer might not have access to.
    no, i go to the qry pane, select new qry, in the designer select fname from a table

    then in the col for fname in the designger do some thing like :

    thr : Left(fname,3) and that is where he is getting an error

  7. #7
    Join Date
    Feb 2004
    Posts
    142
    In Access 2000 and beyond you have to manually set the DAO lib reference. Goto and open any form or other module and goto tools references to see if the reference to the DAO 3.6 library is checked. If not then add it. If there are any other missing references you will find it there as well.

    It seems a bit wierd but if you get a compile error on a left function call, it is almost always a missing lib. reference. This is fairly common.
    KC

  8. #8
    Join Date
    Oct 2003
    Posts
    311
    Originally posted by DCKunkle
    Left is a VBA command. If there are problems with your references then usually all VBA commands cannot be executed. What you want to do is open a module. If you don't have any, open a new one. In the toolbar you will see Tools, in the Tools choose the References it will show a whole list of library names. The ones that are checked are the ones that are being used by your database.

    My guess is when you go to your boss' machine you will see that one says MISSING next to it. Typically it is a third party control or another Access database that your boss' computer might not have access to.

    Missing : Microsoft outlook 9.0

    I unchecked it and everything is fine now. 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
  •