Public Function sqlText(ByRef str As String) As String On Error GoTo ErrHandler If IsNull(str) Or Len(str) = 0 Then sqlText = "''" Else sqlText = "'" & str & "'" End If End FunctionIs there a better way to handle this now? What about boolean and datetimes?