1) Assuming that "dozens" is the right order of magnitude, you can use TempVars to store those values. They will always be available to queries and code, and can be accessed with a standard naming convention. You are limited to 255 total tempvars.
2) Depending on how you plan to use the constants, you could create a tblConstants table with two fields, ConstName and ConstValue. This is more clumsy than TempVars, but has no upper limit for how many you could use.
3) Use a getter function such as the following, in a standard module:
Code:
Option Compare Database
Option ExplicitGlobal GBL_UserID As String
Global GBL_UserName As String
Global GBL_LogInTime As Date
Global GBL_LogOutTime As Date
Function set_globals()
GBL_UserID = Environ("UserID")
GBL_LogInTime = Now()
End Function
Public Function get_global(G_name As String) As Variant
Select Case G_name
Case "GBL_UserID"
get_global = GBL_UserID
Case "GBL_UserName"
get_global = GBL_UserName
Case "GBL_LogInTime"
get_global = GBL_LogInTime
Case "GBL_LogOutTime"
get_global = GBL_LogOutTime
End Select
End Function