Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access reserved words 1

Status
Not open for further replies.

PTmon

IS-IT--Management
Mar 8, 2001
284
US
Does anyone have a list of reserved words in Access? I'm having a problem with a query that I can't seem to fix. Double checked my coding many times now and it's making me crazy :)
Thanks,
PT

 
Usually you can avoid problems with reserved words by putting square brackets around field names. eg [Date] would be a field but Date would be the Date function.

Most reserved words are going to be Access functions, for which you can see a list in the wizard that has a magic wand icon, or standard SQL reserved words such as SELECT, SUM, COUNT, FROM, ... Obviously if you are using ADODB or DAO to program Access queries from VBA their libraries will have additional items such as database or recordset.

A Google search on SQL RESERVED WORDS or on ACCESS RESERVED WORDS will throw up lots of references.
 
Otherwise, post your SQL and something may jump out.

In particular, you need to watch if you are linking via ODBC or ADO as Access SQL is not the same as ODBC. For example, to find all accounts beginning with P

Access: where accode like "P*"
ODBC: where accode like 'P%'

There are other syntax issues where you are updating but using a JOIN.

I am away for a while starting in a couple of days so you might need to restart the thread if this does not resolve quickly.

Thanks for the star!
 
I made the mistake of naming a column DESC once (Short for description). Of course, this is also Decending (as in sort). Oops.




 
Reserved words like GROUP can be used if you put the field names in brackets. Maybe you have two tables and have the joined field listed for each table? In that case, the field name is "[TABLE_NAME.FIELD_NAME]".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top