Match multiple fields on query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sc5502
    New Member
    • Jun 2014
    • 102

    Match multiple fields on query

    Front End: MS Access 2010
    Back End: SQL Server 2008

    My skill set 1-10: Access 5, Sql 4
    I have a form (unbound) that has 3 fields to be input, date, line and shift. The user fills in the fields and presses a Display button to display the results of the query. The query is a bound Subform. See the attached. For example, he/she types 12/08/2014, B and 2 the query would the display all records that match the criteria.

    Date Line Shift
    12/08/2014 B 2 ..........
    12/08/2014 B 2 ..........

    Thank you.
    Attached Files
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3664

    #2
    Question: displays records that ONLY match those three criteria? Or, any combination of the three?

    The easy way, for a three-way match, is establishing a Filter string for your sub-form. After the person hits the display button, the filter string is created, using the criteria of the text boxes, and then it applies that filter to the subform. Refresh the subform and there you go.

    Same principle applies for different types of matches.

    Comment

    Working...