* Check all fields from a database.
* If they have a NULL value, return the value as a SPACE.
* If they are NOT NULL, return the value as a STRING.
* The input parameter is a VARIANT, but the value returned is always a STRING.
Public Function StrNulls(vntField As Variant) As String
If IsNull(vntField) Then
StrNulls = " "
Else
StrNulls = Trim$(CStr(vntField)
End If
End Function
USAGE: txtAddress.Text = StrNulls(rs!Address)
Copyright © 2006-2019, LQSystems,Inc. All rights reserved.