View contents of this chapter

Data Type Functions

VB provides several functions that work with the data type of their arguments instead of the argument values:

  • The data-inspecting functions IsDate(), IsNull(), IsNumeric(), and varType()
  • The IIf() and choose() shortcut functions
  • The data type conversion functions

The Data-Inspection Functions

The data-inspection functions inspect data types and special contents of variables. The following table lists these functions:

Function name Description
IsDate() Returns a Boolean value indicating whether an expression can be converted to a date.
IsEmpty() Returns a Boolean value indicating whether a variable has been initialized.
IsNull() Determines whether its argument holds a Null value.
IsNumeric() Returns a Boolean value indicating whether an expression can be evaluated as a number.

Play Sound Use IsNull() to see whether a control or field on a report or form contains data. Use IsEmpty() just for variables.

 



© Universal Teacher Publications        INDEX Previous Screen Next Screen