Hi,
What's the best way to set things up so that users can change the value of a constant? I currently have stuff in my code like
but that means that whenever my users decide to change their goal, they have to call me, I have to edit the code, and re-distribute new copies of the front-end. Obviously not very desirable.
In other places I have put similar information in a table, something like:
Fieldname=T4ChGoal
FieldValue=9
Then I use a Dlookup in the code wherever I need to use this value, and I supply the user with a form to edit the values in the table when necessary. However, I know Dlookups can be slow so am not sure this is the best way to go.
I was really hoping I could do something like
Is there a better way?
What's the best way to set things up so that users can change the value of a constant? I currently have stuff in my code like
Public Const T4ChGoal As Double = 9
but that means that whenever my users decide to change their goal, they have to call me, I have to edit the code, and re-distribute new copies of the front-end. Obviously not very desirable.
In other places I have put similar information in a table, something like:
Fieldname=T4ChGoal
FieldValue=9
Then I use a Dlookup in the code wherever I need to use this value, and I supply the user with a form to edit the values in the table when necessary. However, I know Dlookups can be slow so am not sure this is the best way to go.
I was really hoping I could do something like
but of course Access won't let me do this.public const t4ChGoal as double=dlookup("FldValue","Constants","FldName='t4ChGoal'")
Is there a better way?