@ 5:05 Could you help me understand why the "CustomerComboQ" designation of each of the fields is in brackets, but the CustomerComboQ that is the criteria to pick from (..FROM CustomerComboQ ORDER BY..) is not in brackets / does not need to be in brackets?
Scott Axton
@Reply 3 years ago
Back up to about 4:00 min and listen again. Richard explains it pretty plainly.
1. If you are only working with one table or query, you don't need the TableName - [TableName].[FieldName]
2. If you make your names as Richard teaches, no spaces, you don't have to put the brackets around the field name.
So say your field name (with a space) is: Customer Name
You would have to enclose that with the brackets like: [Customer Name]
If you name it properly, without a space: CustomerName That is all you need because Access recognizes that as a valid field.
The same applies with naming your tables. If you have a space Customer Combo Q brackets are required.
[Customer Combo Q] No space: CustomerComboQ is all that is needed.
In a nutshell the [ and the ] tells where the field name starts and stops so that Access understands.
Hope that helps.
Benjamin HeacoxOP
@Reply 3 years ago
Scott, thank you for your swift response. I understood that when a field or property has a spacebar in it, it needs brackets, but none of the fields or tables in this SQL command had spaces. My question then becomes why would Access put the brackets on some fields and not others?
Sometimes I get in my head and end up asking questions that I later realize are essentially irrelevant because I think I may need to know the answer someday, or that if I had known earlier I might avoid confusion. If I am off in the weeds over this question and it won't really matter, please let me know. I am just fearful that because I am completely new to this I will end up writing SQL that access doesn't recognize because I haven't formatted it correctly - with or without needed brackets.
Thank you for your time.
Scott Axton
@Reply 3 years ago
I really can't answer your question as to why Access does what it does. I've just learned to deal with it.
In the query designer especially you have to explicitly enter the brackets - otherwise Access will put your field name in quotes, even when you don't have a space in the field name.
It really is one of those things you just learn to work with over time. I don't even know of a "list of quirks" to tell you when to or what to watch out for.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 3.