Tools

SortingFindingThe toolbar used for most forms now contains the following tools: Sort, Filter, and Find.

Note that much of the information on this Tools page was taken from Microsoft Access Help.
 

Sorting

Use ascending order to sort dates and times from earlier to later. Use descending order to sort from later to earlier.

Numbers stored in Text fields are sorted as strings of characters, not numeric values. Therefore, to sort them in numeric order, all text strings must be the same length with shorter numbers padded with leading zeros. For example, the result of an ascending sort of the text strings "1", "2", "11", and "22" will be "1", "11", "2", "22". You must pad the single-digit numbers with a leading zero for the strings to be sorted properly: "01", "02", "11", "22".

When you sort a field in ascending order, any records in which that field is blank (contains a Null value) are listed first. If a field contains records with both Null values and zero-length strings, the fields with null values appear first in the sort order, immediately followed by the zero-length strings.

You can't sort a field whose data type is Memo. Some comments fields may be of the Memo data type, but Baker and Associates uses this data type sparingly.
 

Filtering

There are a few different ways to filter records in a form or datasheet: Filter By Selection, Filter By Form, and Filter For Input. Filter By Selection is a technique for filtering records in a form, datasheet, or data access page in which you retrieve only records that contain the selected value. Filter By Form is a technique for filtering data that uses a version of the current form or datasheet with empty fields in which you can type the values that you want the filtered records to contain. This will only work for users who are not using the runtime version of Access. Finally, Filter For Input is a technique for filtering records that uses a value or expression that you enter to find only records that contain the value or satisfy the expression. Several of our forms, like the Accounts form in the General Ledger or the Fire Code Lookup in the Fire Watch II system, use this last method

  • If you can easily find and select the value you want the filtered records to contain, use Filter By Selection.
  • If you want to choose the values you're searching for from a list without scrolling through all the records, or if you want to specify multiple criteria at once, use Filter By Form.
  • If the focus is in a field and you just want to type in place the exact value you're searching for or the expression whose result you want to use as your criteria, or if you want to specify multiple criteria at once, use Filter For Input.
     

Finding

This is a dialog box that allows you to search for data in a table or on a form. To access this dialog box, make sure the cursor is in the field you want to search then press Ctrl + F at the same time. The name of the field will show up in the Look In field.

There are several options available. To see help on each item in the Find in field window, right click on the item and click on What's This.

For the fastest searches, search for whole field values or the first character within a single indexed field. Key fields like Roll and Code will always be indexed.

Find Specific Occurrences of a Value in a Field

You can find all occurrences of a specified value at once, or each occurrence one at a time. For information on finding Null values and zero-length strings, click here.

  1. Click Find on the toolbar.
  2. In the Find and Replace box, type the value you want to find. If you don't know the exact value you want to find, you can use wildcard characters in the Find What box to specify what you're looking for.
  3. Set any other options you want to use in the Find and Replace dialog box.
  4. Click Find Next.

Find Blank Fields or Zero-Length Strings

A zero-length string is a string that contains no characters. You can use a zero-length string to indicate that you know no value exists for a field. You enter a zero-length string by typing two double quotation marks with no space between them (" ").)

  1. Click Find on the toolbar.
  2. Do one of the following:
    • If blank fields are formatted to show a string (such as "Unknown"), type the formatted string in the Find and Replace box, and make sure that the Search Fields As Formatted check box is selected.
    • To find unformatted blank fields, type Null or Is Null in the Find and Replace box, and make sure that the Search Fields As Formatted check box is not selected.
    • To find zero-length strings in a Microsoft Access database, in the Find and Replace box, type double quotation marks ("") with no spaces in between, and make sure that the Search Fields As Formatted check box is not selected.
  3. Set any other options you want to use in the Find and Replace dialog box.
  4. To find one or more occurrences of a blank field, click Find Next.

Replace specific occurrences of a value in a field

  1. On the Edit menu, click Replace.
  2. In the Find and Replace box, type the value you want to find; in the Replace With box, type the value you want to replace it with.
  3. If you don't know the exact value you want to find, you can use wildcard characters in the Find What box to specify what you're looking for.
  4. Set any other options you want to use in the Find and Replace dialog box. For more information about an option, click , and then click the option.
  5. Do one of the following:
    • To replace all occurrences of the specified value at once, click Replace All.
    • To replace each occurrence one at a time, click Find Next, and then click Replace; to skip an occurrence and find the next one, click Find Next.

Wildcard Characters to Search for Partial or Matching Values

You use wildcard characters as place holders for other characters when you are specifying a value you want to find and you:

  • Know only part of the value.
  • Want to find values that start with a specific letter or match a certain pattern.

Wildcard characters are meant to be used with fields that have the Text data type. You can sometimes use them successfully with other data types, such as dates, if you don't use the Microsoft Windows Control Panel to change the regional settings for these data types.

You can use the following characters in the Find and Replace dialog boxes, or in queries, commands, and expressions, to find such things as field values, records, or file names.

Character

Usage

Example

*

Matches any number of characters. It can be used as the first or last character in the character string.

wh* finds what, white, and why

?

Matches any single alphabetic character.

B?ll finds ball, bell, and bill

[]

Matches any single character within the brackets.

B[ae]ll finds ball and bell but not bill

!

Matches any character not in the brackets.

b[!ae]ll finds bill and bull but not bell

-

Matches any one of a range of characters. You must specify the range in ascending order (A to Z, not Z to A).

b[a-c]d finds bad, bbd, and bcd

#

Matches any single numeric character.

1#3 finds 103, 113, 123

  • Wildcard characters are meant to be used with text data types, although you can sometimes use them successfully with other data types, such as dates, if you don't change the Regional Settings properties for these data types.
  • When using wildcard characters to search for other wildcard characters such as an asterisk (*), question mark (?), number sign (#), opening bracket ([), or hyphen (- ), you must enclose the item you're searching for in brackets. If you're searching for an exclamation point (!) or a closing bracket (]), you don't need to enclose it in brackets.

    For example, to search for a question mark, type [?] in the Find dialog box. If you're searching for a hyphen and other characters simultaneously, place the hyphen before or after all the other characters inside the brackets. (However, if you have an exclamation point (!) after the opening bracket, place the hyphen after the exclamation point.)
  • You can't search for the opening and closing brackets ([ ]) together because Microsoft Access interprets this combination as a zero-length string. You must enclose the opening and closing brackets in brackets ([[ ]]).
  • If you're searching for values in a table other than a Microsoft Access table, such as a Microsoft SQL Server table, you may need to use different wildcard characters. Check the documentation for that data source for more information.

 

[Tools] [Backups] [Compact] [Users]