I have tried to use ENUMS in my code for Access 2007. But it's very uncomfortable. May be it's better to use collections ?
My code isn't working is such way I thought it would be useful.
Public Function
GetEnumId(Name As String, ReferenceTable As String) As Long
Dim rs As DAO.RecordSet
Set rs = CurrentDb.OpenRecordset("Select * From " & ReferenceTable & _
" Where Name= '" & Name & "'")
GetEnumId = rs("ID")
rs.Close
End Function
' Doesn't work because of wrong type params
Public Function GetEnumName(ID As Long, ReferenceTable As String) As String
Dim rs As DAO.RecordSet
Set rs = CurrentDb.OpenRecordset("Select * From " & ReferenceTable & _
" Where ID= '" & ID & "'")
GetEnumName = rs("Name")
rs.Close
End Function