You have a few options:
- Create a hidden table to store such parameters
- Create a custom database property
- Create a registry entry (encrypted or not, that is up to you)
- Store it in your VBA (you can password protect it, but that is very easy to bypass or distribute it as an mde which the code is not accessible)
Below is a crude example of creating a custom db prop
Function SetDbProp()
'https://docs.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/document-createproperty-method-dao
'https://docs.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/field-type-property-dao
On Error GoTo PropNotExist
CurrentDb.Properties("YourPropName") = #7/4/2019#
Exit Function
PropNotExist:
Set prp = CurrentDb.CreateProperty("YourPropName", dbDate, #7/4/2019#)
CurrentDb.Properties.Append prp
End Function
and then you can read it by doing
CurrentDb.Properties("YourPropName")
Daniel Pineault, 2010-2018 Microsoft MVP
Professional Support: http://www.cardaconsultants.com
MS Access Tips and Code Samples: http://www.devhut.net