Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    whats happenning to my query? (97 sr2)

    Hi, I have a database that i have been developing / using for sometime now. I have just rebuilt my PC and when i try out a query i get the error message
    "Function isnt available in expressions in query expression"

    the part of the query that causes problems is
    mydata=left([fieldname],5)

    WHY ?

    I have tried re-installing, service packing, re-service packing. Other databases are fine, ie the LEFT expression works as expected.

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    Check the references to see if any are missing in that db.
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    Wirral, Merseyside, Merseyside, England
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    I think this is one of the things that happens when one of the references is not checked. Module / Tools / References.

    Unfortunately it slips my mind as to which one it is. I'd try either Microsoft Access or Microsoft DAO, but it may be another.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    how do i check the references of a query?

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    Caz hit it below. Type Alt-F11 to bring up the VBA IDE, then head to Tools -> References, and see if any are flagged as missing. Lemme know how it turns out.
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    OK I feel stupid now, the modules reference ADO 2.5 and Access 8. What next ?

    also, why do the module references affect the query ?
    surely it is possible to have a db with no modules, how would you get the query to work then ?

  7. #7
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: whats happenning to my query? (97 sr2)

    The references are for the database as a whole, not for a particular collection of objects like queries, modules, tables, etc. I'm betting that if you find the reference to Visual Basic for Applications, you'll find your problem. The Left() function is a VBA function; no pointer to the VBA library means that Access has no idea what Left() is whether it's being used in a query, module, or what have you.

    Post back and let us know how it's working out. And dont' worry, this exact same thing happens to everyone and the the first time it does, you wrack your brain and end up looking, well, like your pic! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Found out : whats happenning to my query? (97 sr2)

    ok guys, thanks for the help. i ended up removing all references and then re referencing them. i think it was the different version of ado(?) 2.1 v 2.5 anyway problem solved

    thank you <img src=/S/trophy.gif border=0 alt=trophy width=15 height=15>

Posting Permissions

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