Hello all,
I'm using A97 and I'd like to keep about 30 informations concerning the
logged in user, in order to prevent hundreds of DB access per user to
get these informations (mainly rights + email, name, login, ...). So I
would like to load and keep these informations only once. I know I
could create an hidden form holding these values but is there another
way? I'd like to create a user-defined Type or a Classe module but I
can't figure out how to get a property value from the name of that
property (air coded):
------------------------------------------------------
Public Function getUserValue(field As String) As Variant
Static user As MyDefinedType
If IsNull(user.login) Then
'Fill the user data
End If
getUserValue = user(field) 'or user.properties(field) or ...
<-- Is there a way similar to this to access a property ?
End Function
------------------------------------------------------
I hope it's clear enough. The fact is that I really would like to keep
getUserValue(String) definition the same since this function is called
at so many place in the program.
Any other suggestion?
Yannick