Append To field name has space dash space

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2003. While in Design mode, my append query works when
clicking the Datasheet View. However, it gives an error message about an
unknown fieldname when I click this query from the list of queries or from a
OpenQuery Macro Action. Help.

More info: The Append To field in question is Div – Dept – Proj. Yes,
field name has space dash space. It is listed in the drop down as is. And
selected as is. However, it always gets saved without the spaces. Either
name works in Datasheet View. But it does not work when clicking the query
from the list of queries nor from a macro. The query did not use to have any
error message. The only new thing was some automatic software updates pushed
by IT to my computer when I start up. Renaming the field will be my last
option because there are other fields spelled this way (space dash space) and
there are a bunch of queries, forms, reports and macros in use.
 
The SQL-Statement created will always remove the spaces so therefore the
field will never be recognized and the error message will appear. I tried it
and got the same result.

Go with the last option and rename the field to something without the spaces
and dashes...

Maurice
 
If you delimit the field name with [ ] characters in the SQL statement, the
field name will be usable as is:

SELECT TableName.[Div - Dept - Proj]
FROM TableName;
 
Back
Top