• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: VII APPENDIXES > CREATING VBA OBJECT BASE NAMES

CREATING VBA OBJECT BASE NAMES

When creating Visual Basic object base names, remember that the base name must be descriptive even in the absence of its tag. For many programmers, the syntax Dim I As Integer for a loop variable is quite acceptable. Within LNC, however, the variable named I would become iintLoop. Single-character variable names—especially without tags—aren't allowed. Instead, create a list of short and standardized work variables to handle common daily needs. Table D.10 suggests the LNC approach to commonly used variables.

Table D.10. Standardized LNC Work Variables
Variable Description
blnRet Captures a true/false return value from a function call
cccDebug Creates a conditional compilation constant for turning conditional debugging on and off
dbsCur Sets a database object variable for the current Access database (CurrentDB)
intErr Preserves the value of Err
iintLoop Provides a counter for For...Next loops
intMsg Captures a return value from a MsgBox() function call
intResult Holds the result of math operations (also dblResult, lngResult, and so on)
intRet Captures a numeric return value from a function call (also dblRet, lngRet, and so on)
intWork Used for any temporary work (also dblWork, lngWork, and so on)
strMsg Used to build long message box strings
strOrder Used to build long SQL ORDER BY strings
strSQL Used to build long SQL strings
strWhere Used to build long SQL WHERE clauses



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint