Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Expert 6    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
601 Reserved Words
Michael Olgren 
      
8 months ago
No need to keep a list of reserved words. You can look them up here:
https://support.microsoft.com/en-us/office/learn-about-access-reserved-words-and-symbols-ae9d9ada-3255-4b12-91a9-f855bdd9c5a2
Alex Hedley  @Reply  
           
8 months ago
Glossary: Reserved Words
Kevin Robertson  @Reply  
          
8 months ago
I think Reserved Words needs to be added to the Dropdown Box on the navigation bar.
Richard Rost  @Reply  
           
8 months ago
How about I load them into the search index and if you search it, the system will tell you it's a reserved word. Eh?
Kevin Robertson  @Reply  
          
8 months ago
Both options sound good.
Raymond Spornhauer  @Reply  
          
8 months ago
Michael

If you use good naming conventions, you shouldn't need to memorize any reserved words.

Examples:
For Controls:
btnName
chkName
lstName
txtName
etc...

For Variables:
strName
varName
blnName
intName
etc...

Also... creating a variable with a generic name is usually not good either.  You'd be better specifying more descriptive Names:

btnExit
btnNotes
lblFirstName
lblLastName

strComponentName
strHomeAddress
strFirstName
strLastName

dblValueName
intValueName

dtStartDate
dtEndDate

There are lots of examples of naming conventions online that are very useful.  This will also help you when it comes time to debug errors.

-Raymond
Kevin Yip  @Reply  
     
8 months ago
The most important names to get right are table names and field names, because it may become difficult to rename them down the road, as any developer can attest.  Access table design actually warns you about some reserved words (picture below), but not others.  It warns you when you use "Name" or "Text", but doesn't warn you if you use "Caption", "Height", "Width", etc., even though they are all common property names.  Therefore, the user has to be vigilant when Access doesn't give a warning, because that does NOT necessarily mean it's okay.  Sometimes you can get by with reserved words, but sometimes you get conflicts.  E.g. Me.Caption could be a form field named Caption or the form caption itself.
Kevin Yip  @Reply  
     
8 months ago

Kevin Yip  @Reply  
     
8 months ago
Raymond  Those are Lezynski naming conventions, and there are supporters and detractors for them.  I don't use them, and neither does Richard, I believe.  But I do use some form of conventions (as most coders would), especially for non-local names that have wide scope.  Local variables I usually don't worry about; if I keep procedures short (a good general practice for any coder), the reader can usually see the Dim statements at the top.  But public vars and procedure names have wide scope and can show up anywhere, potentially confusing the reader.  What I usually do is use "G_" to denote public vars for all modules, "M_" to denote public vars for one module only, and verbs for naming procedures:

    G_AdminName
    M_GrandTotal
    GetGrandTotal()
    ShowOrderInfo()
Richard Rost  @Reply  
           
8 months ago
I was thinking of developing something that people could install on their databases. Basically a table with all the reserved words and a little bit of code that could just scan all of your object names and your field names. And make a list of any ones it finds that are reserved words like the ones you mentioned: Name, Text, Caption, Height, etc.
Alex Hedley  @Reply  
           
8 months ago
Sounds like a good use case for an AddIn
Kevin Yip  @Reply  
     
8 months ago
Some platforms (including .Net) support "overloading," which allows the same name to be used for different functions, properties, etc.  That means reserved words can also be re-used as something else.  In fact, VB.Net uses many of its own reserved words for different purposes.  For instance, the Right() string function shares the same name as the Right property of a control, its right margin:

     s = Strings.Right(s, 2)     ' The rightmost 2 characters of s
     i = MyTextbox.Right      ' Distance from the textbox to the right edge of the form
     Dim right As Integer     ' User-defined variable named right
Richard Rost  @Reply  
           
8 months ago
Very similar to how VBA supports Right(variant) and Right$(string)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 6.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/13/2026 8:30:21 PM. PLT: 1s