Hi,
I'm doing some vba dev with Access 97 and I have a question for you all:
If I define a custom class module (call it myClass) and then instantiate an instance of that object somewhere in some code (call the instance myObj) can I save that object directly into a table?
What I'm really trying to do is this:
Dim myObj As myClass
Dim myRecSet As Recordset
Set myObj = New myClass
Set myRecSet = CurrentDb.OpenRecordset( "myTable", dbOpenDynaset)
With myRecSet
.AddNew
![myField] = myObj
.Update
.Close
End With
I've tried it with myField defined as an OLE/Object but with no success. Any ideas?
Thanks,
Gus
I'm doing some vba dev with Access 97 and I have a question for you all:
If I define a custom class module (call it myClass) and then instantiate an instance of that object somewhere in some code (call the instance myObj) can I save that object directly into a table?
What I'm really trying to do is this:
Dim myObj As myClass
Dim myRecSet As Recordset
Set myObj = New myClass
Set myRecSet = CurrentDb.OpenRecordset( "myTable", dbOpenDynaset)
With myRecSet
.AddNew
![myField] = myObj
.Update
.Close
End With
I've tried it with myField defined as an OLE/Object but with no success. Any ideas?
Thanks,
Gus