Entering other simple criteria
You can also specify criteria for Numeric, Date, and Yes/No fields. Simply enter the example data in the criteria field.
It is also possible to add more than one criteria to a query. For example, suppose that you want to look only at contacts who are both sellers and buyers (“BOTH” type in the ContactType field), and those contacts have been customers since January 1, 2007 (where OrigCustDate is greater or equal to January 1, 2007).
This query requires criteria in both the ContactType and OrigCustDate fields. To do this, it is critical that you place both examples on the same Criteria row. Follow these steps to create this query:
- Create a new query starting with tblContacts.
- Add ContactType, FirstName, LastName, State, and OrigCustDate to the QBE grid.
- Enter BOTH in the Criteria cell in the ContactType column.
- Enter >= 01/01/07 in the Criteria cell in the OrigCustDate column.
- Run the query.
Figure 36-19 shows how the query should look.
Access displays records of contacts that are both sellers and buyers that became customers after January 1, 2007—in this example, two contact records.
FIGURE 36-19
Specifying character and date criteria in the same query.
Access uses comparison operators to compare Date fields to a value. These operators include less than (<), greater than (>), equal to (=), or a combination of these operators. Notice that Access automatically adds pound sign (#) delimiters around the date value. Access uses these delimiters to distinguish between date and text data.
The pound signs are just like the quote marks Access added to the “Cars” criteria. Because the OrigCustDate is a DateTime field, Access understands what you want and inserts the proper delimiters for you.
// Related Posted - GOOGLE!
Related Websites
- Use a Treasury Ladder to Control Inflation and Interest Rate Risks Inflation and interest rates are destined to change in the coming months, perhaps radically. These potential changes present significant risks...
- How to Overclock NVIDIA Graphic Cards Overclocking a Nvidia graphics card is not difficult at all, and it's a great way to improve performance in gaming. ...
- Homewood Ski Area, Homewood, CA Homewood Ski Area is located in: Homewood, CA Phone: (530) 525-2992 Website: http://www.skihomewood.com/ About the Resort: This is an ideal...
- Bushnell 5x20 Golf Scope Rangefinder (Silver) User Reviews Send this to a friend Bushnell 5x20 Golf Scope Rangefinder (Silver) Manufacturer: Bushnell Customer Rating: List Price: $24.99...
- Callaway LR550 Rangefinder, Yellow User Reviews Send this to a friend Callaway LR550 Rangefinder, Yellow Manufacturer: Callaway Golf Customer Rating: List Price: $299.95 Sale...

