Results 1 to 4 of 4
  1. #1
    Billabong is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2016
    Posts
    3

    Simple query giving "system resources exceeded" error

    The query is intended to be run via VBA but fails so I've copied it to the query window and it still gives me the same "system Resources Exceeded" error when run from there too.



    I'd appreciate it if someone could tell me what I can do to improve this, I've tried adding and removing quotes and parentheses but I still get the same result.

    SELECT auf_nr FROM tmptblTSExtract WHERE ((((tmptblTSExtract.[AUF_NR])=23066488) AND ((tmptblTSExtract.[AUF_POS])=2)) AND ((tmptblTSExtract.[TXT_Line_Code])=0));


    Thanks in advance

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    How large is your database?
    How many records and fields are in this tmptblTSExtract tabke?
    Does the table have Primary Keys and indexes?

    Have you tried Compacting and Repairing the database?

    It may be possible that your database is corrupt. If that is the case, try importing your data table to a new Access database, and try running the query there and see if that makes any difference.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    rather than copying in SQL code into a query design - - instead use the manual set up of query design view....

    from what I see of your sql code your AND clauses refer to fields that are not included in the select....

  4. #4
    Billabong is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2016
    Posts
    3
    Table is 300K+ records and there's no unique field so I hadn't added a primary key but I have indexed the key fields (Auf_nr and a couple of others) and it seems to be running fine now.

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-15-2016, 08:11 AM
  2. Replies: 4
    Last Post: 05-22-2015, 02:29 AM
  3. Replies: 12
    Last Post: 12-11-2012, 01:47 PM
  4. Replies: 2
    Last Post: 05-17-2011, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums