- database solutions and downloads for microsoft access

Microsoft Access Query Operators

Microsoft Access and Boolean Operators:

Queries are a very important feature of Microsoft Access that can tell you information about the data stored in the Access tables. Queries make it easier to search the data from different fields. Therefore, using queries to achieve the results you are looking for is quite a useful tool. However, when you have large amounts of information, you will need more advanced techniques such as Boolean Operators to make sense of the queries you have inputted.

Boolean operators are one of the best advance techniques that queries use to sort the information and return the results you have asked for. George Boole created Boolean operator language while he was a mathematics teacher at Queen’s College in Cork. He presented the algebraic theories governing Boolean language in 1849, but his theories were not accepted at that time. However, today the language is quite well used and relies on two basic Boolean operators, "AND" and "OR".

The AND Operator

The Boolean AND operator is very effective when you want to limit the data. By using AND you can narrow down the data to only certain fields in your query.

For example, if you have ownership of two online bookstores and you want to know information about the items you have in stock, you can use the AND operator. If you needed to know which of the two bookstores sold magazines, the AND operator could show this by placing store’s name in the Criteria cell under the Name field and placing magazines in the Criteria cell under the Item field. You are basically asking Microsoft Access to show the following data, "Store Name AND Magazines".

The AND operator is useful in organizing information. You can also use it search for more than one Criteria such as "Store Name AND Item AND Price". Any data placed into the Criteria fields will be read in a horizontal manner and subjected to the AND operator.

The OR Operator

Another Boolean term in Microsoft Access is the OR operator. Unlike the AND operator which narrows down the information to specific terms, the OR operator increases the amount of results that you receive. The OR operator in Microsoft Access will only return either of the data you ask it for.

Using the OR operator in Microsoft Access is quite effective, especially if you would like your results displayed for certain data. Using the previous example, if you had online bookstores and would like to know which bookstore sold magazines and which bookstore sold dictionaries. You would type in "Magazines" in the Criteria cell under Items and "Dictionaries" in the OR cell under Items as well. You are basically asking Microsoft Access to show the following data, "Magazines OR Dictionaries".

Using More Than One Boolean Operator

For very advanced data, the Microsoft Access user can combine these two operators to help sort through their data. For example, if you wanted to know which of the online bookstores you owned sold either magazines or dictionaries, you could enter this request in the Criteria and OR cells. You would enter the "Store Name" and enter "Magazines" in the Criteria cell for Items. Then going down to the second OR cell, you would then enter the "Store Name" and "Dictionaries" under Items. You are basically asking Microsoft Access to find "Store Name AND Magazines OR Dictionaries".

The important points to remember when using the AND Criteria is to place each two or three criteria you want to investigate on the same line and the computer will read them across from left to right. However, data to be entered for the OR cells should be placed on separate lines for it to be evaluated individually. Thus the use of Boolean operators will decrease the amount of time you spend in Microsoft Access.

The Author

Lashan Clarke has been both a fiction and nonfiction freelance writer for a number of years. She specializes in copywriting and is currently working on her Master's degree in her spare time. Her main areas of writing include travel writing, technical or business writing especially computer software, and health related articles. She can be reached at