Replace specific occurrences of a value in a field
You can replace all occurrences of the specified value at once or each occurrence one at a time. If you want to find Null values and zero-length strings, however, you must use the Find dialog box to find these occurrences, and then replace them manually. For more information, click .
- In Form or Datasheet view, select the field (column) you want to search, unless you want to search all fields. (Searching a single field is faster than searching the entire datasheet or form.)
- On the Edit menu, click Replace.
- In the Find What box, type the value you want to find; in the Replace With box, type the value you want to replace it with.
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. For examples of wildcard characters and how to use them, click .
- Set any other options you want to use in the Replace dialog box. Click More for additional options.
- 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.
Notes
- In a Microsoft Access database, you can replace large amounts of data more quickly or perform calculations on data (such as raising all salaries in an Employee table by 5 percent) by using an update query instead of the Replace dialog box. However, you can't confirm individual replacements when using an update query and an update query isn't as convenient when you want to search for and replace data in more than one field. In a Microsoft Access project, you can use a stored procedure to update large amounts of data.
- When replacing data in a datasheet with a subdatasheet, or form with a subform displayed as a datasheet, Microsoft Access only replaces data in the datasheet, subdatasheet, or form where you’ve placed the insertion point.
- In the Code window, the Replace dialog box has additional options specific to the Visual Basic Editor. You can specify the range of the search by selecting an option in the Search options group. Note that Access searches procedures based on the order they were added to the module. The Use Pattern Matching check box uses the same semantics as the Like Operator uses.