How can I use a wildcard in a form that runs a query?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbarkerua
    New Member
    • Mar 2010
    • 2

    #1

    How can I use a wildcard in a form that runs a query?

    I have a form with Combo Box drop down menus:

    Last Name: [combo box]
    First Name: [combo box]

    The form posts to a table.

    I have a query that pulls the data with a 1 to 1 relationship made between the data table and the form table.

    Communications related to that person are displayed in a report. Now, I can select the last name and the first name and see all communications with that person. I would like to be able to select last name only and see all communications for people with that last name. I tried adding a wildcard to the first name combo box and that returns no results. Is it possible to do what I am trying to do?

    Thanks!
  • patjones
    Recognized Expert Contributor
    • Jun 2007
    • 931

    #2
    Hi -

    Generally, you would simply want to set the query criteria so that it looks for whatever last name the user picked from the last name combo box...and that's it. No need to put a wildcard in for the first name.

    Pat

    Comment

    • mbarkerua
      New Member
      • Mar 2010
      • 2

      #3
      Pat,

      Thanks for your help.

      When I leave the first name field blank, I get no results. This is due to the 1 to 1 relationship between the form table and the data table in the query. To solve the problem, I just created a new query, table, and report that only used last name as criteria.

      Comment

      Working...