Data Type

  • Thread starter Thread starter Mei Qin
  • Start date Start date
M

Mei Qin

Hello,

I imported a table from SQL server using ODBC. One of the
column in SQL has NULL value. I checked in Access table
after import. It did not show anything. In my modules, I
need to check the value of this column. But it gave me
errors with all of the following:

If trim(cstr(columnname)) = "" then ...
or trim(columnname) = ""
or IsNull(columnname)
or len(trim(columnname)) = 0

What is the data type after import? How can I check the
value?

Thanks for any help!
 
I usually use this to trap both Null and empty string:

If Len([FieldName] & "") = 0 Then
' there is no value in the field
End If
 
Back
Top