[AccessD] Global Variable

Susan Harkins ssharkins at bellsouth.net
Wed May 18 08:01:09 CDT 2005


Not to mention that the data type is the first step to validating your data
-- if Integer isn't large enough, the data's wrong -- there's a very good
reason TO use Integer. 

Susan H. 

<< Declaring a variables an Integer IS bad practice.  It is bad practice
because even if you think a variable will never go over 32k, or below -32k,
it can, and probably will.

Question: So when will the following declaration exceed the 32k, -32k limit?

Dim intFamilyMembers as integer 'Number of immediate family members

Answer: When you declare the variable as a Public (global) variable, then
some other function written by some other developer changes its intended use
causing the original function to possibly work incorrectly.





More information about the AccessD mailing list