Case Example


The following case example reviews some of the tools and techniques you learned about in this chapter.

1.

Open the frmCustomers form.

2.

In the State field, select any instance of CA, right-click, and choose Filter by Selection.

3.

Select any instance of Sacramento, right-click, and choose Filter by Selection.

4.

In the ZIP Code field, select 94205, right-click, and choose Filter Excluding Selection.

5.

Choose Records, Filter, Advanced Filter/Sort (see Figure 7.15) to see the criteria you've designated.

Figure 7.15. The design grid shows that the filter has three conditions, all of which must be true at the same time.


6.

Choose Filter, Filter by Form.

7.

Click Clear Grid.

8.

In the Phone field, type 213*.

9.

Click in the ZIP Code field. Open the drop-down list and select 90096.

10.

Click the Or tab at the bottom of the screen. Open the drop-down list in the Phone field. Select 2075550847.

11.

Click the next Or tab (the one farthest right). Open the drop-down list for the City field and select Bakersfield.

12.

Click Apply Filter. The datasheet has three records (see Figure 7.16).

Figure 7.16. The filter uses a combination of AND and OR criteria.


13.

Choose Records, Filter, Advanced Filter/Sort.

14.

Delete the CustZIP column. Review the criteria on the Design grid.

15.

Click Apply Filter. Try to determine why each of the five records was chosen (choose Records-Filter-Advanced Filter/Sort as necessary).

16.

Click Remove Filter.

17.

Choose Records, Filter, Advanced Filter/Sort.

18.

Click Clear Grid.

19.

Double-click the CustState and CustCity fields, in that order, to add them to the grid.

20.

Type a in the Sort row for both fields for ascending sorts.

21.

Click Apply Filter.

The records are sorted first by state, and then, within each state, by city.

22.

Choose Records, Filter, Advanced Filter/Sort.

23.

In the Criteria row of the CustState field, type >k.

24.

Click Apply Filter.

Note that any two-letter state abbreviation beginning with k or greater, such as KY or TN, will be included in the records.

25.

Click Remove Filter. Note that one phone number is a null value.

26.

Right-click anywhere in the Phone field.

27.

Type is null in Filter For. Press Enter.

The record with a null value in the Phone field is displayed.

28.

Click Remove Filter. Click Filter by Form.

29.

Edit the expression in the Phone field to Is Not Null.

30.

Click Apply Filter.

All the records except the one containing the null in the Phone field are displayed.

31.

Close the form and any other open windows, and exit Access.




Hands-On Microsoft Access(c) A Practical Guide to Improving Your Access Skills
Hands-On Microsoft Access: A Practical Guide to Improving Your Access Skills
ISBN: 0321245458
EAN: 2147483647
Year: 2005
Pages: 169
Authors: Bob Schneider

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net