Interesting David,
How would one do this?
Public Function SomeValue(Optional strSetValue As String) As String
Static strValue As String
If Len(strSetValue)>0 And Len(strValue)>0 Then
strValue = strSetValue
End If
SomeValue = strSetValue
End Function
Now, you may see a problem with that -- there's no way to
de-initialize it. This kind of thing is most useful when you have a
value that is going to be referred to many times in a session, but
looked up only once. It's very useful for things you look up from
tables, or for something like the Windows user logon, which can't
change during the Access session.