IT tutorials
 
Office
 

Microsoft Access 2010 : Using Forms to Enter and Edit Table Data (part 3) - Copying Records Within a Form

- 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:13:43 PM

4. Copying Records Within a Form

Copy Entire Records

At times, you want to copy an entire record. This generally occurs because you are creating a new record and the new record is very similar to an existing record. For example, you might have two contacts at the same company who share similar information. You can copy the existing record and then make the necessary changes to the new record. Here’s the process:

1.
Select the record you want to copy. You can select the record by clicking the gray record selector or by choosing Select from the Find group on the Home tab of the ribbon and then choosing Select from the drop-down menu.

2.
Select Copy in the Clipboard group on the Home tab of the Ribbon.

3.
Select Paste in the Clipboard group on the Home tab of the Ribbon, and then choose Paste Append from the drop-down. Access copies the original record and places you in the new record (the copy).

Copying a record often results in what is called a referential integrity error. This occurs, for example, when copying a record would cause a duplicate primary key (that is, unique record identifier). In such a situation, you see an error message such as that displayed in Figure 8. You can either change the data in the field or fields that constitute the duplicate key or you can press the Escape key to cancel the process of appending the new row. For example, in the example shown in Figure 8, you can modify the company name.

Figure 8. Error that appears when copying a record results in a referential integrity error.


5. Finding a Record That Meets Specific Criteria

If you are editing records in a form, you need to find specific records quickly. The same procedure used in Datasheet view helps you to quickly locate data in a form:

1.
Select the field that contains the criteria for which you are searching (in this case, Salesperson).

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 9).

Figure 9. The Find tab of the Find and Replace dialog box, where you search for values in a datasheet.

3.
Type the criteria in the Find What text box. For this example, type Nancy Freehafer.

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

5.
Use the Match drop-down list box to designate whether 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 the word 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. For this example, designate that you want to match the whole field.

6.
Use the Search drop-down list box to designate whether to search only up from the current cursor position, only down, or in all directions. For this example, designate that you want to search 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 or select Find again from the Ribbon.

Replace Data in the Table Underlying a Form

Sometimes you might want to update records that meet specific criteria. You might want to do this, for example, if a company changes its name or you realize that you have improperly entered an employee’s social security number. The Replace feature automatically inserts new information into the specified fields. Here’s the process:

1.
Click within the field that contains the criteria you are searching for (Job Title for this example).

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 10).

Figure 10. The Replace tab of the Find and Replace dialog box, where you can replace table data.

4.
Type the criteria in the Find What text box. Type Owner for this example.

5.
Type the new information (the replacement value) in the Replace With text box. Type CEO for this example.

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.

9.
Repeat steps 7 and 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 simultaneously.

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 Access 2010 : Using Forms to Enter and Edit Table Data (part 2) - Using a Form to Delete Records from a Table
- 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
 
 
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