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 Beginner 3    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Underscores
Colleen Valdez 
   
15 years ago
Thank you for clarifying the verbiage between Excel & Access (something I need to make a habit).  Request clarification on your response.  As you state you CAN use spaces or underscores, but was wondering if underscores alleviate the issue that spaces cause later in the advanced courses.  Or is the underscore as problematic as the space?


Reply from Richard Rost:

The underscore DOES alleviate the problem. In a nutshell, the reason why I strongly urge AGAINST using spaces is because it becomes a nightmare later on if you get into advanced topics like writing your own SQL statements or VBA programming. For example, to refer to a field on an open form, you can just say:

MyValue = Forms!FormName!FieldName

However, if you have spaces in your form and field names, this has to become:

MyValue = Forms![Form Name]![Field Name]

You have to remember to put square brackets around EVERYTHING which does become a pain. Same thing with SQL statements:

SELECT * FROM CustomerTable WHERE CustomerID=5

becomes...

SELECT * FROM [Customer Table] WHERE [Customer ID]=5

So it's just MUCH easier to teach people in the beginning NOT to use spaces. But yes, to answer your question, underscores are just fine. This is perfectly valid:

MyValue = Forms!Customer_Form!First_Name

Hope this helps.

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

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: 5/7/2026 10:32:25 AM. PLT: 1s