first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

PROBLEM: Type Conversion Failure When Updating Rows with a Function of Type Variant

Functions of type Variant, by default, return Empty not Null. Variant-type functions are useful when used to update rows in a table because these functions can return Null. However Null must be specified as the default value of such functions. If the function returns Empty to a field that does not accept strings, a type conversion error will occur.

One form for specifying a default value is

Public Function basMyFunc()
    basMyFunc = Null
    'The rest of this procedure follows.
End Function
mod date: 1998-08-07T15:42:46.000Z