Microsoft Office Tutorials and References
In Depth Information
Exhibit 4.23 Example of more complex search
The results of the queries are shown in Exhibit 4.23. Of the 21 records in the
database, 11 total records satisfy the 3 queries. The first query in the list above (1.)
returns the record number 12. The second query (2.) returns the record 13. The third
query (3.) returns all other records shown (2, 3, 5, 8, 14, 17, 18, 21, 22), as well as
record 12 since this record also indicates the sale of a sedan; thus, the first and third
queries have record number12 in common.
To re turn a split (non-contiguous) range of dates, or any variable for that matter,
place the lower end of the range on a row and the upper end of the range on the same
row under a duplicate title, in this case Date . This may seem a bit cumbersome, but
given the advantages in simplicity of Advanced Filter over true database software,
it is a minor inconvenience for small scale applications. For example, consider a
Date query where we were interested in records for sales occurring on and between
1/01/05—1/12/05, and on or after 1/22/05. The first row in the Advanced Filter will
contain “>
1/22/05”.
Make sure that all other criteria for each row are the same, in this case blank, or you
will not be querying the database with a precise focus on the Date range intended.
Again, this is a relatively complex query that can be executed with a very small
amount of effort. Exhibit 4.24 shows the filter criteria, results, and the dialogue box
required to execute this query.
As you can see, the power of Advanced Filter is substantial. Its ability to handle
complex queries makes it an excellent alternative to a dedicated database program
=
1/01/05” and “<
=
1/12/05”. The second row will contain “>
=
Search JabSto ::




Custom Search