Append To field name has space dash space

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.
 
G

Guest

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
 
K

Ken Snell \(MVP\)

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top