Invalid Bracketing (1 Viewer)

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:30
Joined
Jul 9, 2003
Messages
16,278
I see many beginners with MS Access using field names with spaces in. Access can handle this, it puts square brackets around these "Offensive" objects!

I say "offensive" because they offend me! You see a person paste their sample code in the forum asking why it doesn't work.

You mention that it's not correctly formatted, because the field names SHOULD NOT contain spaces, but you often feel like your advice falls on deaf ears.

It's a rule I've known about since I started practically. I knew spaces caused problem, but I didn't know why, until I read this excellent post:- "MS Access – Sub-Query – Invalid Bracketing"

by Daniel Peneault


Also posted to Nifty Access on Facebook:-
https://www.facebook.com/groups/MS.Access.Hints.And.Tips
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:30
Joined
Feb 19, 2002
Messages
43,257
Wow, I've never run into that problem probably because I never create improper names and also because I rarely use subqueries since for most purposes joins to other queries will do the same job and are easier to create and test.

Anyone with any programming background understands the reason for rules on variable name format. This is probably the only decision the original Access team made that I object to. I wonder what there discussion was like - "But we have to allow users to create object and column names that include spaces and special characters because they're novices, not programmers" - "no we don'1!!!!!!" - "Yes, we do!!!!" -- that's when the table flipped over and the chairs hit the floor. That's sort of how the discussion went when the A007 team told my group about the abomination data types and how the junction table was hidden for the multi-value field:)
 

Users who are viewing this thread

Top Bottom