Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2013
    Posts
    2

    Unanswered: Multiple search query

    I have a labour hire database. I have created a search form that has two postal code criteria (from and to) and three skills you can search. Currently the results are bringing back anyone living in the postal code range that has any of the skills. Can you please tell me how to make report show people within that post code range that has all of the skills?

    Currently the criteria is [Forms]![Skill and Location Search]![Combo21] Or [Forms]![Skill and Location Search]![Combo23] Or [Forms]![Skill and Location Search]![Combo25].

    I have tried replacing the "Or" with "And" but that doesn't seem to work.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Can you provide more information about your table structure?
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2013
    Posts
    2
    Hi George

    Thanks for your reply. Please see my attachment that shows the query and table relationships.

    Regards

    Laura
    Attached Thumbnails Attached Thumbnails Database query.png  

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Laura,

    Here, "table structure" usually means name of the columns (fields) and their definition (data type, Null allowed, ...), not a simple screenshot. One of the reason being that the way a SQL expression is built (correctly) partly depends on the data type of the columns it references, e.g.:
    Code:
    "WHERE CustomerID = 123"    ' CustimerID is defined as Numeric (Integer or Long).
    but:
    Code:
    "WHERE CustomerID = 'ABC'"    ' CustomerID is defined as Text (String).
    Whether a column accepts Null or not (Required in Access terminology) can also change the way you write the query and/or what it will return.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •