Hi, I am trying to upgrade my Access database system to 2016 and so far it is OK however the code below is no longer working and keeps producing the error "Private Enum and user defined types cannot be used as parameters or return types for public procedures, public data members, or fields of public user defined types"
"Private Type PostcodeData
Lookup As String * 60
Postcode As String * 8
postcodeType As String * 2
Organisation As String * 30
Property As String * 30
Street As String * 60
Locality As String * 60
Town As String * 30
County As String * 30
ctyOption As String * 1
mailsort As String * 5
STD As String * 8
gridN As String * 6
gridE As String * 5
CensusCode As String * 4
Affluence As String * 30
LifeStage As String * 100
AdditionalCensusInfo As String * 200
Occupancy As String * 1
AddressType As String * 1
Reserved As String * 48
End Type
Private Declare Function GetFirst Lib "PCode32.DLL" (details As PostcodeData, reverse As Integer) As Long
Private Declare Function GetNext Lib "PCode32.DLL" (details As PostcodeData) As Long"
The code above is used by Private subs and Private functions. I have tried changing them to public but it said produced the error.
Does anyone know why this code no longer works in Access 2016?
Thanks.

"Private Type PostcodeData
Lookup As String * 60
Postcode As String * 8
postcodeType As String * 2
Organisation As String * 30
Property As String * 30
Street As String * 60
Locality As String * 60
Town As String * 30
County As String * 30
ctyOption As String * 1
mailsort As String * 5
STD As String * 8
gridN As String * 6
gridE As String * 5
CensusCode As String * 4
Affluence As String * 30
LifeStage As String * 100
AdditionalCensusInfo As String * 200
Occupancy As String * 1
AddressType As String * 1
Reserved As String * 48
End Type
Private Declare Function GetFirst Lib "PCode32.DLL" (details As PostcodeData, reverse As Integer) As Long
Private Declare Function GetNext Lib "PCode32.DLL" (details As PostcodeData) As Long"
The code above is used by Private subs and Private functions. I have tried changing them to public but it said produced the error.
Does anyone know why this code no longer works in Access 2016?
Thanks.

