"david" <le******@sympatico.ca> wrote in message
news:ff************************@posting.google.com ...
I want to give the user the ability to change a setting.
Example Discount rate = .4
value stored in record 1 tblSettings.Discount
the user will be able to change the value through a form that only
allows modifying record 1.
How do I pass this value to a module and then refer to it in queries,
forms and reports.
David
It sounds like you want to store this one single variable for your whole
application. Although I can't think of a time when I've needed a _discount_
setting across the whole application, I often have similar variables like
MyCompany, MyAddress, MyPhone, etc so these settings can be printed out on
reports.
I do this by having a table tblDbInfo with one row and use
var=DLookup("[MyCompany]","tblDbInfo","[ID]=1") to extract this information.
Variations on this basic theme involve writing a public function to do the
lookup, or setting a global variable at application startup (this approach
needs some caution)
Hope this gives you an idea
Fletcher