Question Locked

Query By Form Help Using MS Access 2010

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
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.

3 replies

by 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.

by 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.

This discussion is closed to new replies.