Results 1 to 4 of 4
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    Parameter Queries - Include rather than exact

    When setting up a parameter query, is there a way for the query to show data that "includes" the words rather it being an "exact" match? For example, I want to set up a parameter query for the "name" column but this column has first and last name. I want to set it up so if you type john, it will show both people with the first name "John" and last name "Johnson"

  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,652
    Use Like and wild cards. With a form textbox a criteria of:

    Like "*" & Forms!FormName.TextboxName & "*"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    Do you mind explaining a bit further? I'm not sure exactly what that means. Right now in the Design View of the query, I have [Enter Employee Name:] in the criteria cell of the "employee name" column. So, I have to type the employee name exactly as it is in the table. I'd like to have the ability to type just the first name, last name, or possibly a portion of the last name if possible.

    Also, not sure if it matters, but this query is pulling from my table. I'm not using a form for this.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Your criteria becomes:

    Like "*" & [Enter...] & "*"
    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. How To Include Multiple Queries Into One Report
    By newuserthatneedsassistanc in forum Access
    Replies: 52
    Last Post: 07-27-2017, 09:16 AM
  2. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  3. Parameter Queries & Reports
    By Nixx1401 in forum Reports
    Replies: 6
    Last Post: 05-07-2011, 08:09 PM
  4. parameter queries
    By cpride in forum Access
    Replies: 1
    Last Post: 03-23-2011, 09:21 PM
  5. Replies: 10
    Last Post: 12-11-2010, 11:01 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