IT tutorials
 
Office
 

Microsoft Access 2010 : Using Forms to Enter and Edit Table Data (part 2) - Using a Form to Delete Records from a Table

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
1/5/2013 5:12:00 PM

3. Using a Form to Delete Records from a Table

Before you can delete records, you must first select them. I therefore cover the process of selecting records before I cover the process of deleting records.

To select a record, you just click the gray record selector button to the left of a record within a form (see Figure 3). Access selects the record.

Figure 3. The gray selector button.

To select multiple records (when the form is in Continuous Forms view or Datasheet view), you click and drag within the record selector area. Continuous Forms view enables you to view multiple rows of data in a form at a time. Access selects the contiguous range of records in the area over which you click and drag. As an alternative, you can click the selector button for the first record you want to select, hold down the Shift key, and then click the selector button of the last record that you want to select. Access selects the entire range of records between the two selector buttons. Figure 4 shows the Orders table, with three records selected.

Figure 4. The Orders 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 of the Ribbon. Then choose Select from the drop-down menu.

Delete a Record

When you know how to select records, deleting them is quite simple. The process is almost identical to that of deleting records in a datasheet:

1.
Select the record you want to delete.

2.
Press the Delete key. A dialog box appears, asking whether you’re sure you want to delete the records (see Figure 5).

Figure 5. A dialog box that asks if you want to delete the selected records.

3.
Click the Yes button.

Delete Records from Tables with Referential Integrity

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. A dialog box appears, saying that the record cannot be deleted or changed because the table includes related records (see Figure 6).

Figure 6. 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. 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. A dialog box appears, asking whether you are sure you want to delete the records (see Figure 7).

Figure 7. Access asking whether you want to delete the parent row and the associated child records.

3.
Click Yes to complete the deletion process.
 
Others
 
- Microsoft Access 2010 : Using Forms to Enter and Edit Table Data (part 1) - Moving from Record to Record in a Form, Undoing Changes Made Within a Form
- Microsoft OneNote 2010 : Using Page Templates
- Microsoft OneNote 2010 : Working with Subpages
- Microsoft Visio 2010 : Printing Basics (part 2) - Print Preview, Experimenting with Printing Without Wasting Trees
- Microsoft Visio 2010 : Printing Basics (part 1) - Printing from the Backstage Area
- Microsoft Visio 2010 : Running Computer and Network Reports, Searching and Replacing Text
- Microsoft Project 2010 : Documenting Work Package Details
- Microsoft Project 2010 : Setting Up Custom WBS Codes
- Microsoft Project 2010 : Documenting a WBS in Another Program
- Upgrading and Converting to Access 2010 : ENABLING A DATABASE, ACCESS 2010: 64-BIT CONSIDERATIONS
 
 
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