Hi guys,

Is there anybody who can help me with the IsDBNull function. I would like to use it to check if the field "CompanyID" in the datatable "tblCD" is a DBNull value.

VB Code:
  1. If IsDBNull(Me.DSlistboxes.Tables("tblCD").Rows(0)("CompanyID")) Then
  2.             CompanyIDEmpty = True
  3.         Else
  4.             CompanyIDEmpty = False
  5.         End If

I'm sure the row(0) contains a DBNull-value (I inserted it myself) but the function IsDBNull doesn't detect it because the boolean CompanyEmptyID is always false while it should be true for that row.

What am I doing wrong? Or is there another way to check for dbnull values?

Kind regards,

Tom