IT tutorials
 
Office
 

Microsoft Access 2010 : Deleting Records

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
10/10/2011 9:14:12 AM
Before you can delete records, you must select them. The following sections cover the process of selecting records and then the process of deleting records.

Selecting One or More Records

To select one record, you just click the gray record selector button to the left of the record within the datasheet.

To select multiple records, you click and drag within the record selector area. Access selects the contiguous range of records in the area over which you click and drag. As an alternative, you can click the gray selector button for the first record you want to select, hold down the Shift key, and then click the gray selector button of the last record that you want to select. When you do this, Access selects the entire range of records between them. Figure 1 shows the Customers table with three records selected.

Figure 1. The Customers table with three records selected.

If you want to select a single record when the cursor is within the record, you can simply choose Select from the Find group on the Home tab, and then choose Select. To select all records, choose Select from the Find group on the Home tab, and then choose Select All.


Deleting Records

When you know how to select records, deleting them is quite simple. You just follow these steps:

1.
Select the records you want to delete.

2.
Press the Delete key. The dialog box in Figure 2 appears, asking whether you’re sure you want to delete the records.

Figure 2. Access asks if you want to delete the selected records.


3.
Click the Yes button. Access deletes the records.

The process of deleting a record is not so simple if you have established referential integrity between the tables in a database and the row that you are attempting to delete has child rows. You can think about the fact that customers generally have orders associated with them, and those orders have order detail records associated with them. The relationship between the Customers table and the Orders table prohibits the user from deleting customers who have orders. Here’s how you delete a customer who has orders:

1.
Select the records you want to delete.

2.
Press the Delete key. The dialog box in Figure 3 appears, telling you that the records cannot be deleted because the table includes related records.

Figure 3. Access notifying you that you cannot delete the selected records.

3.
Click OK to close the dialog box.

Access provides a referential integrity option with which you can cascade a deletion down to the child table (a table related to a parent table, such as orders related to customers). This means, for example, that if you attempt to delete an order, Access deletes the associated order detail records. If you establish referential integrity with the cascade delete option, the deletion process works like this:

1.
Select the records you want to delete.

2.
Press the Delete key. The dialog box in Figure 4 appears, asking if you’re sure you want to delete the records.

Figure 4. Access asking if you want to delete the parent row and the associated child records.

3.
Click Yes to complete the deletion process.

After you have selected records, they appear in black, and you can copy them, delete them, or modify them as a group. Remember that deleting records is a permanent process. You cannot undo record deletion.


Finding and Replacing Records

When you are working with records in a large data table, you often need a way to locate specific records quickly. By using the Find feature, you can easily move to specific records within a table. After you have found records, you can also replace the text within them.

Find a Record That Meets Specific Criteria

The Find feature enables you to search in a datasheet for records that meet specific criteria. Here’s how it works:

1.
Select the field containing the criteria for which you are searching.

2.
Click the Find button in the Find group on the Home tab of the Ribbon. The Find and Replace dialog box appears (see Figure 5).

Figure 5. The Find tab of the Find and Replace dialog box, which you can use to search for values in a datasheet.

3.
Type the criteria in the Find What text box.

4.
Use the Look In drop-down list box to designate whether you want to search only the current field or all fields in the table.

5.
Use the Match drop-down list box to designate whether you want to match any part of the field you are searching, the whole field you are searching, or the start of the field you are searching. For example, if you type Federal in the Find What text box and you select Whole Field in the Match drop-down list box, you find only entries where Ship Via is set to Federal. If you select Any Part of Field, you find Federal Shipping, Federal Express, United Federal Shipping, and so on. If you select Start of Field, you find Federal Shipping and Federal Express, but you do not find United Federal Shipping.

6.
Use the Search drop-down list box to designate whether you want to search only up from the current cursor position, only down, or in all directions.

7.
Use the Match Case check box to indicate whether you want the search to be case sensitive.

8.
Use the Search Fields as Formatted check box to indicate whether you want to find data only based on the display format (for example, 17-Jul-96 for a date).

9.
Click the Find Next button to find the next record that meets the designated criteria.

10.
To continue searching after you close the dialog box, use the Shift+F4 keystroke combination.

Replacing Data in a Table

There may be times when you want to update records that meet specific criteria. You can use the Replace feature to automatically insert new information into the specified fields. Here’s how:

1.
Click within the field that contains the criteria you are searching for.

2.
Click the Replace button in the Find group on the Home tab of the Ribbon. The Find and Replace dialog box appears.

3.
Select the Replace tab (see Figure 6).

Figure 6. The Replace tab of the Find and Replace dialog, within which you can replace table data.

4.
Type the criteria in the Find What text box.

5.
Type the new information (the replacement value) in the Replace With text box.

6.
Choose values for the Look In drop-down list box, Match drop-down list box, Search drop-down list box, Match Case check box, and Search Fields as Formatted check box.

7.
Click the Find Next button. Access locates the first record that meets the criteria designated in the Find What text box.

8.
Click the Replace button. Access replaces the text for the record and finds the next occurrence of the text in the Find What text box.

9.
Repeat step 8 to find all occurrences of the value in the Find What text box and replace them. As an alternative, you can click the Replace All button to replace all occurrences at once.

You should use Replace All with quite a bit of caution. Remember that the changes you make are permanent. Although Replace All is a viable option, when you use it you need to make sure you have a recent backup and that you are quite certain of what you are doing. In fact, I usually do a few replaces to make sure that I see what Access is doing before I click Replace All.


10.
Click Cancel when you’ve finished.

If you are searching a very large table, Access can find a specific value in a field fastest if the field you are searching on is the primary key or an indexed field.


When using either Find or Replace, you can use several wildcard characters. A wildcard character is a character you use in place of an unknown character. Table 1 describes the wildcard characters.

Table 1. Wildcard Characters You Can Use When Searching
Wildcard CharacterDescription
*Acts as a placeholder for multiple characters
?Acts as a placeholder for a single character
#Acts as a placeholder for a single number
 
Others
 
- Microsoft Visio 2010 : Sharing Diagrams by Using the Visio Viewer
- Microsoft Visio 2010 : Creating Visio Templates
- Microsoft Word 2010 : Creating an XML Document
- Microsoft Word 2010 : Customizing Word - Linking and Embedding Files
- Microsoft PowerPoint 2010 : Saving a Presentation as a Slide Show & Saving a Presentation as a Video
- Microsoft PowerPoint 2010 : Delivering a Show on Multiple Monitors
- Getting Started with Microsoft Excel 2010 : Arranging Windows
- Getting Started with Microsoft Excel 2010 : Moving Around the Workbook
- Microsoft Outlook 2010 : Working with the Ribbon and the Backstage View
- Microsoft Outlook 2010 : Working in the Outlook Program Window
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us