I don't remember that discussion, but I'll weigh in with what I do.
My users get MDEs or ACCDEs. Those will not lose the variable value when an error happens. Secondly, The problem only comes up when the error is not handled with an error trap.
Liz's idea is a good one but if you go that route why not just use a table. Retrieving the value could be done with a domain aggregate. DLookup("myValue", "myVarTable", "MyVariable = 'UserGroup'")
Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com
---In MS_Access_Professionals@yahoogroups.com, <zctek@aol.com> wrote:
Hi All,
Many months ago there was a discussion re. holding Global Variables in a Class Module being preferable to holding them in a standard Module because in the event of an error, the Variables could lose their value.
If that is true then I would like to see and example of a Class Module holding one or more Global Variables.
I would appreciate any help. I am using Access 97, 2003, and 2007.
Regards, Clive.
__._,_.___
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (4) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar