Access empty string and null value

Source: Internet
Author: User
Tags type null

What is an empty string and a null value:

Microsoft Access can differentiate between two types of null values. Because in some cases the field is empty, it may be because the information is currently unavailable, or the field is not available for a particular record. For example, there is a "phone number" field in the table that leaves it blank, possibly because the customer's phone number is not known, or the customer does not have a phone number. In this case, leave the field blank or enter a null value, which means "not known." An empty string inside double quotes means "know no value". You can control the processing of blank fields by combining different settings for the fields ' required fields ' and ' Allow empty string ' properties. The Allow empty string property is available only for text, Memo, or Hyperlink fields. The required Fields property determines whether data entry is required. When the Allow empty string property is set to Yes, Microsoft access distinguishes between two different white-space values: null values and empty strings. If the Allow field is empty and you do not need to determine an empty condition, set the required field and the Allow empty string property to No as the default for the new text, Memo, or Hyperlink fields.

If you only allow fields to be empty when no field record value is allowed, set both the required field property and the Allow empty string property to Yes. In this case, the only way to make the field empty is to type double quotation marks without spaces, or to enter an empty string by a space. If you do not want the field to be empty, set the required field property to Yes, and set the Allow empty string property to No. If you want to distinguish between two reasons for a field's whitespace as unknown information and no information, you can set the required field property to No, and the Allow empty string property to Yes. In this case, when adding a record, if the information is unknown, you should leave the field blank (that is, enter a null value), or you should type a double quotation mark ("") without a space to enter an empty string if the value is not provided to the current record.

How to find an empty string and a null value:

If a user needs to modify a record in a table that contains an empty string and a null value, you need to use the Find command on the Edit menu to find the location of a null value or an empty string. In Datasheet view or Form view, select the fields you want to search, type Null in the Find what box to find null values, or type double quotation marks ("") without spaces to find an empty string, select entire field in the Match box, and make sure that search fields by format is cleared check box. In general, when you sort fields in ascending order, any records that contain empty fields (containing null values) are listed first in the list. If the field contains both a null value and an empty string, the field containing the null value is displayed in the first bar followed by an empty string.

Access empty string and null value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.