Hello,
I am not new to Access, but new to using Variables properly and all that.
I have a table [tbl_Working_Coe] which has a bunch of numbers [Working_Coe] which are used through out the database to calculate working coefficients for loads and speeds. I want to give the admin user the ability to change these Working Coefficients and have then update through out the database where used. I would then be using these variables in reports or forms to calculate the desired Working Coefficients for weight and speed.
A simplified example of what i am trying to accomplish is the conversion of pounds to kilograms. This calculation would be used roughly 20 times around the report, and if for some reason the admin wants to change the conversion from .454 to a the more specific 0.453592, i want them to change it in the table, and then have it update through out the database.
When I try to declare the variable in a module, I keep getting errors. These are the VBA codes I have tried that I am sure are wrong and have not worked.
Code:
Public LBtoKG As Long
LBtoKG = DLookup("[Working_Coe]", "tbl_Math_Variables", "[Work_Coe_ID] = 3")
Code:
Public Const LBtoKG as Long = DLookup("[Working_Coe]", "tbl_Math_Variables", "[Work_Coe_ID] = 3")
Thank you for your help