That error means you created a reference for an object, but never told the compiler what object that reference points to.
If you did this:
VB Code:
Dim X As DataSet Debug.WriteLine (x.Tables.Count)
You would get that error. You declared X as a reference to a dataset, but haven't either initialized one(using New), or set X to an existing dataset.
VB Code:
Dim X as [b] New [/b] DataSet Debug.WriteLine (x.Tables.Count)
So, my guess: You are missing a New operator somewhere(perhaps Shapes?), or you are setting a reference to something that wasn't created (perhaps it had no data in it)




Reply With Quote