Questions

Query By Form Help Using MS Access 2010

+
0 Votes
Locked

Query By Form Help Using MS Access 2010

alwaysajewell
I have a search form that has five fields I can enter criteria in. When I enter Brown in the last name field and Mayor in the office field, I get every person named Brown and every person that ran for mayor. I need to get only those persons named Brown that ran for mayor. I changed the SQL to AND instead of OR, and when I did a search, nothing came up.
  • +
    0 Votes
    john.a.wills

    1. Maybe no-one named Brown has ever run for Mayor.
    2. Maybe you put the AND in the wrong place or the wrong context: carefully check any parentheses in your query, remembering that AND binds tighter than OR.

    +
    0 Votes
    alwaysajewell

    Thank you for your answer. I will check the parentheses in the query. I know there is one Brown for Mayor that should have come up.

  • +
    0 Votes
    john.a.wills

    1. Maybe no-one named Brown has ever run for Mayor.
    2. Maybe you put the AND in the wrong place or the wrong context: carefully check any parentheses in your query, remembering that AND binds tighter than OR.

    +
    0 Votes
    alwaysajewell

    Thank you for your answer. I will check the parentheses in the query. I know there is one Brown for Mayor that should have come up.