Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2005
    Posts
    28

    Unanswered: Compile Error. in query expression...

    Hello Forum,

    I work for a very large corporation. Today morning when I logged into my computer it asked for a reboot because of recent auto-update. This is a normal routine every month for corporate-wide Microsoft patches.

    Long story short - for the first time, after rebooting, all my MS Access 2000 queries that have any function in it, stopped working. I tried to create simple queries with function (e.g. select trim(FieldName) from TableA) to test, but with no luck. The error I get is:

    Compile Error. in query expression 'trim(FieldName)'.

    Somebody told that I was missing few links to some library references. I didn't know which ones so I reinstalled MS Access 2000 thinking it should resolve the problem. But again with no luck.

    Can someone help please...

    Sunil

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Go to a module (code) wndow and cheese Tools - References and look for missing ones.

    Nice patch ^^
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Apr 2005
    Posts
    28
    Hi - Thanks for reply...

    I did check the references and found the following are checked:

    - Visual Basic For Applications
    - Microsoft Access 9.0 Object Library
    - OLE Automation
    - Microsoft ActiveX Data Objects 2.1 Library

    Surprisingly I have another MS Access Database (almost duplicate) that have no problem running similar query 'trim(FieldName)'. This database too has only four references checked that are similar to above. Soooooo I am totally confused now….



    Please help...

    Thanks

  4. #4
    Join Date
    Apr 2005
    Posts
    28
    …this also establishes that the Microsoft patches did not cause the problem
    Last edited by sunil707; 10-27-09 at 10:05.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    more importantly which references are flagged as MISSING
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Apr 2005
    Posts
    28
    none... in the list that is displayed to check/uncheck...

  7. #7
    Join Date
    Apr 2005
    Posts
    28

    It Worked!!

    Lesson learnt:

    I you have a module created and not fully compiled and error freed and just saved it for a later completion, Access may not run any VBA functions. So do not leave a model for a later completion...

    Thanks all for your help…

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I was just about to suggest compiling
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Apr 2005
    Posts
    28
    Still thanks for your help...

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Welcome, of course
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    Apr 2005
    Posts
    28
    Can you please help me in my thread 'Passing parameter in pass through query..'

    Thanks ton in advance...

    Sunil

Posting Permissions

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