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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Error (missing opertator) in query expression..... 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
Hello,

Is this a new bug in Access?

If I create a new table with a single field called: Asking Rent PCM and then create a query with this field, the query will open OK, but if I try to sort on that field I get the Syntax Error

If in the query I put something like AskingRent: [Asking Rent PCM] then it will sort fine.

I understand that you should not leave spaces in field names, but I'm working with an old database so can not change the names. Why does this happen - I dont recall that this used to be a problem?

Thanks Mark
 
We would need to see the actual query to see what it might not like. I have heard of this issue before.
 
As long as the field names are bracketed. Access should handle it okay (At least it has always worked for me).
 
Yes I accept it is the space in the field name - just surprised i'd never noticed this before (of course my Field Names dont have spaces in them)

Regards
Mark
 
Actually scrap that - it does seem to be some kind of bug.

If you create a new table and have a Currency field called say:
Asking Rent

If you then crete a query from this table (using the normal query design window), run it and then sort on that field, then the syntax error occurs.

If you then edit the table and change it to a short text field, then it works fine. You can then edit the table again and change it back to a currency field and it still works fine.

Very odd.

Regards Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top