Hello CajunCenturion
I fully understand everything you said. The object mobjPerson has been created, set on FormLoad and set to nothing on FormUnload. I have a class CPerson which has a method called GetPersonProfile and a class CPersonDB with a method GetPersonProfileDB as shown below. Everything appears to be as you stated. What is weird is that the IntelliSense brings everything up as I type. But still get the error.
Public Sub GetPersonProfile(ByVal argPersonID As Long)
Dim arrPersons As Variant
Dim objPersonDB As CPersonDB
Set objPersonDB = New CPersonDB
arrPersons = objPersonDB.GetPersonProfileDB(argPersonID)
Set objPersonDB = Nothing
PersonID = arrPersons(0, 0)
FirstName = arrPersons(2, 0)
MiddleName = arrPersons(3, 0) & "" 'Not required
LastName = arrPersons(4, 0)
End Sub
___________________________________________________________
Public Function GetPersonProfileDB(ByVal argPersonID As Long) As Variant
mstrSQL = "Select * from tblPersons Where PersonID = " & argPersonID
GetPersonProfileDB = mobjDataAccess.Retrieve(mstrSQL)
End Function