If (m_strNullValue = Null) Then
换成
If isnull(m_strNullValue) Then其实你的函数一句就能完成
NullToNull=iif(isnull(m_strNullValue),"",m_strNullValue)