Where clause is not working

jchaturv

New member
Local time
Yesterday, 17:05
Joined
Nov 1, 2009
Messages
3
Hi. I am using MS Access 2007.I am getting syntax error, when I execute this query

select 2A.* from 2A where 2A.[Name] = 'jatin';
 
Syntax error (missing operator) in query expression '2A.[Name] = 'jatin''.
 
can you post a screenshot of your query in design view
 
Hey thanks for your help. I got the solution. I forgot to place the name of table in bracket after where clause. Now it is working fine.:)

select 2A.* from 2A where [2A].[Name] = 'jatin';
 
Just an FYI -

You have a field named NAME.
CHANGE IT RIGHT AWAY!!!!!!
Name is an Access Reserved word and one of the WORST to use as a field or object name. If you don't change it, I can GUARANTEE that you will have pain and suffering due to this because EVERYTHING has a name property and even some code using that name property uses square brackets around it to get the name.

So, for most Access Reserved Words, you can get by with putting brackets around it, but in this case don't go there. It isn't worth it. Change the field name to something other than just NAME.
 

Users who are viewing this thread

Back
Top Bottom