Field properties

A

Alan T

I have a text field, why the properties are valid:
Required: No
Allow Zero Length: No

It seems conflict?
The record allows this field blank.
 
D

Dirk Goldgar

Alan T said:
I have a text field, why the properties are valid:
Required: No
Allow Zero Length: No

It seems conflict?
The record allows this field blank.


The "Required" property determines whether the field is permitted to be
Null. The "Allow Zero Length" property determines whether the field may
contain a zero-length string (""). The two are not the same: Null in a
field means that the value is unknown or not applicable; a zero-length
string is a known value equal to "" (a character string that contains no
actual characters).

The distinction is as meaningful as you'd like it to be. In some cases,
it's useful to distinguish between an unknown value and a value that is
known not to exist. For example, you might have a field for storing a
person's middle name, and in that field you might use Null to mean that you
don't know the person's middle name, and "" (a zero-length string) to mean
that you know the person doesn't have a middle name.
 
D

Douglas J. Steele

If the Required property is True, then you must provide a value for the
field. If the Allow Zero Length property is also True, then a zero-length
string ("") is a legitimate value. If the Allow Zero Length property is
False, then you must provide an actual value.
 
D

Dirk Goldgar

Alan T said:
If the 'Required' is Yes, then what does it mean?


Required = Yes/True means Nulls are not permitted in the field. Zero-length
strings may or may not be permitted, depending on the value of
AllowZeroLength.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top