Results 1 to 4 of 4
  1. #1
    nevertool8 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Posts
    5

    Search Form doe Multiple Records

    I'm not real advanced, but I'm not a beginner either. I've created a number of forms based on a file or a query, and placed a "search for" box on the form that allows the user to key in part or all of a text in the search box, press enter of tab, and the code behind the form finds the desired record. But this only seems to work when the searched-for item is unique. The record (or the nearest one to it, if only a partial text was entered) is found and the form positions itself to that record.



    What I'm trying to accomplish may not be possible on a form because the more I think about it, the more I'm guessing that it would involve the form having to reload in order to group the records in a different order than how they initially are loaded and appear. What I'd like to do is what I can do in a query using the LIKE function in the Condition. There the user can type "ALF," and the Query will return any record it finds with the characters "ALF" anywhere in the field. But that's different, because the query selects, sorts, and groups before it presents its results either on the screen or on a report. I'm pretty sure that won't work with a Form, because once the records are displayed on the screen, typing "ALF" in the search box can't resort and regroup records on the screen that may be thousands of records apart.

    So, I may have answered my own question. But if anyone has additional insight into this, I'd appreciate the feedback. Thank you,

    Jerry

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    not sure what you are asking - think you are saying you want to find rather than filter?

    see this link about finding a record https://docs.microsoft.com/en-us/off...cmd.findrecord

    and this one about filtering https://docs.microsoft.com/en-us/off...%28property%29

    perhaps show some example data and the result you want?

  3. #3
    nevertool8 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Posts
    5
    Thank you. Never thought about filter. Will give it a try and see if it does what I want to do. Appreciate the link.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Filter is right...it's the way to return multiple Records.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 1
    Last Post: 11-30-2016, 03:41 AM
  2. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  3. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  4. Search for multiple records
    By Blake in forum Queries
    Replies: 1
    Last Post: 08-23-2013, 03:17 AM
  5. error when search for multiple records.. WHY?
    By KingOf206 in forum Forms
    Replies: 11
    Last Post: 07-10-2013, 12:21 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