IT tutorials
 
Office
 

Microsoft Access 2010 : Maintain Data Integrity (part 2) - Restricting the Amount of Data

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
4/27/2013 9:14:11 PM

2. Restricting the Amount of Data

You changed the Field Size property of several Text fields. You entered the new sizes by making adjustments to the Field Size setting in the Properties group on the Fields tab and to the Field Size property in the Field Properties area in Design view. As you saw, changing the size of a Text field is a simple matter of estimating the largest number of characters you will need to type in the field, up to 255.

Like the Text data type, the AutoNumber and Number data types have an associated Field Size property that restricts the number of digits that can be entered in the field. Of the two, the Field Size property of the Number data type is the most complex. You can set Number fields to any of the settings shown in the following table.

Setting

Description

Byte

Whole numbers from 0 to 255

Integer

Whole numbers from –32,768 to 32,767

Long Integer

Whole numbers from –2,147,483,648 to 2,147,483,647 (the default)

Single

Negative numbers from –3.402823E38 to –1.401298E–45 and positive numbers from 1.401298E–45 to 3.402823E38

Double

Negative numbers from –1.79769313486231E308 to –4.94065645841247E–324 and positive numbers from 1.79769313486231E308 to 4.94065645841247E–324

Replication ID

Randomly generated numbers that are 16 bytes long

Decimal

Numbers from -10^28 -1 through 10^28 -1

The Field Size property of AutoNumber fields can be set to either Long Integer (the default) or Replication ID.

By setting the Field Size property to the setting that allows the largest valid entry, you prevent the entry of invalid values. Access rejects any value that is below or above the size limits of the field when you try to move out of the field.

See Also

For more information about data restrictions, search for Introduction to data types and field properties in Access Help.

In this exercise, you’ll change the Field Size property for two fields to see the impact on data already in the table and on new data that you enter.

Set Up

You need the GardenCompany06 database you worked with in the preceding exercise to complete this exercise. Open the GardenCompany06 database, and display the FieldTest table in Datasheet view. Then follow the steps.

  1. Review the field values in the only record in the FieldTest table.

  2. Switch to Design view, click anywhere in the fText row, and then in the Field Properties area, change the Field Size property from 255 to 18.

    Access will now restrict the number of characters that can be entered in the fText field to 18.

  3. Click any cell in the fNumber row, click anywhere in the Field Size property, click the arrow that appears, and then in the list, click Byte.

    Access will restrict the values that can be entered in the fNumber field to the range 0 through 255 (inclusive).

  4. Switch to Datasheet view, clicking Yes when prompted to save the table.

    Access displays a warning that some data might be lost.

    Set Up

    The table contains data that doesn’t fit the new property settings.

  5. Click Yes to acknowledge the risk, and click Yes again to accept the deletion of the contents of one field.

  6. Double-click the right border of the fText field to widen the column to fit its entry.

    You can now see the impact of the field size changes on the fields.

    Set Up

    The fText value has been truncated, and the fNumber value has been deleted.

    You entered 32 characters in the fText field, and it can now hold only 18. So 14 characters have been permanently deleted. You entered 500 in the fNumber field, and it can now hold only whole numbers from 0 through 255. So the value has been permanently deleted.

  7. In the fNumber field, type 2.5, and press Tab.

    Access rounds the value you entered to the nearest whole number. Because you chose Standard when setting the data type for this field in the previous exercise, the whole number is displayed as 2.00.

Clean Up

Close the FieldTest table, saving your changes. Retain the GardenCompany06 database for use in later exercises.

 
Others
 
- Microsoft Access 2010 : Maintain Data Integrity (part 1) - Restricting the Type of Data
- Microsoft Project and the Project Management Domain : Using Microsoft Project with Methodologies and Life Cycles
- Microsoft Project and the Project Management Domain : Exploring Project Management Industry Standards
- Microsoft OneNote 2010 : Formatting Text (part 2) - Inserting Symbols and Special Characters, Copying and Applying Formatting with the Format Painter
- Microsoft OneNote 2010 : Formatting Text (part 1) - Setting the Default Font, Changing Basic Text Formatting, Using the Styles Gallery
- Microsoft Visio 2010 : Managing and Styling Pages (part 3) - Controlling Page Size and Orientation, Setting Page Scales
- Microsoft Visio 2010 : Managing and Styling Pages (part 2) - Working with Background Pages, Inserting Backgrounds, Titles, and Borders
- Microsoft Visio 2010 : Managing and Styling Pages (part 1) - Inserting Pages
- Microsoft PowerPoint 2010 : Incorporating Motion Video - Specifying Playback Options
- Microsoft PowerPoint 2010 : Managing Videos Between PCs and PowerPoint Versions, Changing the Video's Formatting
 
 
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