03-13-2011, 11:17 PM
lblFirstName.Text = NewPrisoner(i).strFirstName
is returning the old "Object reference not set to an instance of an object."
but i is an integer and NewPrisoner() is obviously an object
I thought maybe it wanted me to assign a value to NewPrisoner(0) as the function (the form loading) is called, so I set NewPrisoner(0).strFirstName to "Example" and I still got the error.
I then set i to 0 just to see if that changed anything, but still no.
I'm presuming when it said object reference it means the sub (), but it should be able to base the sub on the variable "i" even if "i" has not been assigned a variable? and to check it wasn't this I had set "i" to 0...
Mind fuck.
Someone with a formal education please explain what I'm obviously missing.
Thanks.
is returning the old "Object reference not set to an instance of an object."
but i is an integer and NewPrisoner() is obviously an object
I thought maybe it wanted me to assign a value to NewPrisoner(0) as the function (the form loading) is called, so I set NewPrisoner(0).strFirstName to "Example" and I still got the error.
I then set i to 0 just to see if that changed anything, but still no.
I'm presuming when it said object reference it means the sub (), but it should be able to base the sub on the variable "i" even if "i" has not been assigned a variable? and to check it wasn't this I had set "i" to 0...
Mind fuck.
Someone with a formal education please explain what I'm obviously missing.
Thanks.