I have two modules in my access vba project which are part of the problem.
One module contains two types:
=vb Code:
Option Compare Database Option Explicit Public Type CacheTblRow RowItem() As String End Type Public Type CacheTbl Row() As CacheTblRow Success As Boolean FieldNamesOrdered() As String End Type
I have a procedure in the other module that uses these types to declare variables, but when the code gets to these lines I get error:"Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions". Below is my declaration in the 2nd module, in a procedure:
vb Code:
Dim Duplicate_Table As CacheTbl
I really am not sure how to fix this. I have used a different type in my code ealier and that worked, but it was not a nested type.
Any advice greatfully received.
Rich


Reply With Quote
