Why "Name IsNull is not declared"?

  • Thread starter Jeffery B Paarsa
  • Start date
J

Jeffery B Paarsa

Hello,

Here is the code:
Dim objDataRow As DataRow
objDataTable = New Data.DataTable("ZPtTable")
Try
objConn.Open()
objDataAdapter.Fill(objDataTable)
For Each objDataRow In objDataTable.Rows
If IsNull(objDataRow.ItemArray(15)) Then
Me.PEmrCont.Text = "?"
Else
Me.PEmrCont.Text = objDataRow.ItemArray(15)
End If
......
I am getting a curly blue line under IsNull "Name IsNull is not declared"?
Why is that? What am I missing?
 
J

John W. Vinson

I am getting a curly blue line under IsNull "Name IsNull is not declared"?
Why is that? What am I missing?
This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 
J

Jeffery B Paarsa

Hello,

thanks, but I am not using VBA I am using VB studio 2005. I am getting this
error inside ot VB editor. I closed the project and opened it but it did not
helped.
 
D

Douglas J. Steele

In that case, you'd be best off asking in a newsgroup related to VB.Net,
such as microsoft.public.dotnet.languages.vb

This newsgroup is for questions about Access, the database product that's
part of Office Professional (which uses VBA)
 
J

Jeffery B Paarsa

I was able to solve this problem myself...
If objDataRow.ItemArray(15) Is DBNull.Value Then .....
 
J

Jeffery B Paarsa

I was able to solve this problem myself...
If objDataRow.ItemArray(15) Is DBNull.Value Then .....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top