Results 1 to 2 of 2
  1. #1
    TKing is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    1

    Filter Subform with mulitple search criteria

    Hi all,




    I would like controls on the form that will filter the subform. Ideally, these would filter "after update" of the control, and would add new criteria to the filter as the next control box is chosen. It would also be fine just to filter by all controls with a command button.

    The form: fRequests, with a subform: sbf_supportrequest.
    This is a pretty simple subform with 6 controls. Right now the recordset is a single table. The parent/child values are not set.

    The search controls on the main form are unbound. They are cboEmployee, cboRequesting, cboStatus, txtstartdate and txtenddate (short date). For the dates, I would like the user to be able to enter either both a start/end or only 1 of the values (i.e. if start date, it would search all records from that date to the present).

    Also, instead of leaving the search criteria blank for no filters, it'd be nice to have an "all" choice (which means the same thing, but isnt' it my table).

    This is asking a lot, I'm okay at adapting existing code for my own uses, so even an example of a similar database would be good. I'm using ACC2007.

    thanks for your time.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The sample db at the end of this FAQ demonstrates one method:

    http://www.baldyweb.com/BuildSQL.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 07-29-2011, 07:46 PM
  2. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  3. Query filter search
    By mseeker22 in forum Queries
    Replies: 6
    Last Post: 06-22-2011, 03:35 PM
  4. Search By Criteria - Flexible Criteria Fields
    By lilanngel in forum Access
    Replies: 0
    Last Post: 03-16-2011, 06:25 PM
  5. Database Search filter
    By dada in forum Programming
    Replies: 7
    Last Post: 08-19-2010, 12:42 AM

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