Results 1 to 3 of 3
  1. #1
    sephiroth2906 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    73

    Query only returns fraction of applicable entries

    Hello all!



    I have a query that is designed to look at several fields and return results via a form with unbound text boxes. It uses criteria on each field that use variations of

    Code:
    Like "*" & [Forms]![Search]![txtName] & "*"
    One of the fields is a date field, one a currency field, one is a number field and 5 short text fields

    Right now the database has over 14,000 entries. If I run the query with no values, I get 2727 consistently. When I add values, I am getting really spotty results. There are a whole bunch of entries the query is not returning regardless of what values are entered and which are not.

    Is this sort of query inappropriate for what I am looking for? Is there some sort of time out value I can change? Should I be using a SQL or VBA solution instead? Any guidance that can be offered will be much appreciated!

    Thanks for your time!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Do all records have values in every one of these fields? The LIKE and wildcard is designed to work that situation is the case. If records have Null, they will be ignored. Maybe you need to deal with Nulls. One way:

    Like "*" & [Forms]![Search]![txtName] & "*" Or Is Null
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sephiroth2906 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    73
    Yup! That did it! The users have null fields that should not be null, so that is a whole other issue. There are a few fields that are going to be changed to require input in the near future I believe.

    Thank you so much for the help!

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

Similar Threads

  1. Query returns ro results
    By MichealShinn in forum Queries
    Replies: 5
    Last Post: 02-21-2012, 01:24 PM
  2. CrossTab Query Max X Returns
    By systems013 in forum Access
    Replies: 5
    Last Post: 11-04-2011, 01:12 PM
  3. Droping the fraction of a double into an INT
    By drexasaurus in forum Programming
    Replies: 3
    Last Post: 09-01-2011, 11:25 AM
  4. Applicable Filters Box
    By Gray in forum Forms
    Replies: 0
    Last Post: 05-24-2011, 07:58 AM
  5. Query returns duplicates
    By RobRay in forum Queries
    Replies: 3
    Last Post: 10-26-2010, 01:38 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