Difference of 1. IsNull ()
Null value indicates that the variable does not contain valid data. Null differs from Empty, which indicates that the variable was uninitialized. Null is also different from a 0-length string (""), and a 0-length string often refers to an empty string.
focus on using the IsNull function to determine whether an expression contains a Null value. In some cases, you want the expression to be value True, such as Ifvar=null and Ifvar<>null, but they are usually always False. This is because any expression containing a null itself is null, so the expression evaluates to False.
The following example uses the IsNull function to determine whether a variable contains Null:
Dim MyVar, MyCheck
MyCheck = IsNull (MyVar) ' returns FALSE.
MyVar = null ' is assigned null.
MyCheck = IsNull (MyVar) ' returns TRUE.
MyVar = Empty ' Fu to Empty.
MyCheck = IsNull (MyVar) ' returns FALSE.
2. IsEmpty ()
If the variable is uninitialized or explicitly set to Empty, the function isempty returns True; otherwise, the function returns FALSE. If expression contains more than one variable, the total returns FALSE.
The following example uses the IsEmpty function to determine whether a variable can be initialized:
Dim MyVar, MyCheck
MyCheck = IsEmpty (MyVar) ' returns TRUE.
MyVar = null ' is assigned null.
MyCheck = IsEmpty (MyVar) ' returns FALSE.
MyVar = Empty ' Fu to Empty.
MyCheck = IsEmpty (MyVar) ' returns TRUE.
3. 0 length string ("")
0 length strings are often referred to as empty strings.
str= "", assigning an empty string to a str variable, has been assigned, and is assigned a character
added: You can specify that a field is null in the database design so that if it is no longer assigned to him, the record is null, but when the table is exported, the null record destroys the table's structure, that is, the grid lines in the table will disappear, and many people may A default value is set in the database or an empty string is assigned to the record when processing.