O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix K. Reserved Words and Special Characters

There are numerous words that should not be used to name fields, objects, and variables. For the most part, these are called reserved words. Reserved words have a specific meaning to Microsoft Access, the Jet database engine, and the new Access database engine (ACE). We also list reserved words that have specific meaning to SQL Server or ODBC drivers. Depending on how your application interfaces with other programs, it may be prudent to avoid using words that have specific programmatic meanings to those as well. If you want to start a list of reserved words, begin with the list of all the properties of database objects, all Visual Basic keywords, and all third-party and user-defined names and functions.

Access 2007 creates an error message when select reserved words are used as field names. For the most part, however, using reserved words often creates error messages that do not indicate the source of the problem. For example, it is far from intuitive that the following error message:

The wizard was unable to preview your report, possibly because
a table needed by your report is exclusively locked

may have been triggered by the use of a reserved word. Consequently, a developer may unnecessarily spend time troubleshooting the wrong problem. When you are working with an application that uses reserved words, particularly as the name of tables or fields, rename the database objects if it is at all possible and feasible to do so. If ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required