From: gator on
I am using a SELECT statement as a rowsource on a form listbox. I have a
query named 01-Accounts Query and the SELECT stmt reads as follows...

SELECT 01-Accounts_Query.Name, 01-Accounts_Query.Date FROM 01-Accounts_Query

I get a syntax error in query message. How do I fix this?


From: Marshall Barton on
gator wrote:

>I am using a SELECT statement as a rowsource on a form listbox. I have a
>query named 01-Accounts Query and the SELECT stmt reads as follows...
>
>SELECT 01-Accounts_Query.Name, 01-Accounts_Query.Date FROM 01-Accounts_Query
>
>I get a syntax error in query message. How do I fix this?
>

Any name that contains a character oher than alphanumerics
and underscores MUST be enclosed in [ ] The [ ] are also
required if the name does not start with an alpha betic
character. Because using funky characters in names adds to
syntax complexity, requires more typing and increases the
potential for mistakes, it is a best practice to never use
funky charcters when you make up a name for anything.

I strongly urge you to change the name of the query to
something more like Accounts01query, but if you like the [
], you can get away with using [01-Accounts_Query]

--
Marsh
MVP [MS Access]
 | 
Pages: 1
Prev: Detecting a Character
Next: Missing Operator