"is not a valid name. Make sure

S

Scott

I just converted several my Access Databases to Access 2007 and I am getting
the following error message on 2 of them:

"is not a valid name. Make sure that it does not include invalid characters
or punctuation and that it is not too long.

I have tried creating a new database in 2007 and importing the tables,
queries, etc. I have tried turning the Auto Name Correction function off, I
have made sure that there are no apsotrophe's in the path, but still can't
seem to solve the issue.

This only seems to happen on queries that link multiple tables. I have a
query in 1 database that links 2 tables and works fine, but that same query
in a different database gets the error message. I have seen multiple posts
about this error on the internet, but I have not been able to locate a
solution. Does anybody have any suggestions?

Thanks!
 
K

KARL DEWEY

Do you have table and field names with characters other than alpha-numeric or
include spaces?
 
S

Scott

Hi Karl,

Some queries are off of table and field names that do have spaces, but I am
encountering the same error on tables (and fields) that do not have spaces,
so I didn't think this was the issue.

Here is the SQL for a query that does not have a table or field name with
spaces that gets the error.

SELECT dbo_tbl06141.Bank, dbo_tbl06141.Appl, dbo_tbl06141.Account,
dbo_tbl06141.Serv_code, dbo_tbl06141.Cycle, dbo_tbl06141.Charge_Code,
Sum(dbo_tbl06141.Volume) AS SumOfVolume, Sum(dbo_tbl06141.Charge) AS
SumOfCharge, dbo_tbl06141_MonthEnd.Cycle, dbo_tbl06141_MonthEnd.Charge_Code,
Sum(dbo_tbl06141_MonthEnd.Volume) AS SumOfVolume1,
Sum(dbo_tbl06141_MonthEnd.Charge) AS SumOfCharge1
FROM dbo_tbl06141 LEFT JOIN dbo_tbl06141_MonthEnd ON
(dbo_tbl06141.Serv_code=dbo_tbl06141_MonthEnd.Serv_code) AND
(dbo_tbl06141.Account=dbo_tbl06141_MonthEnd.Account)
GROUP BY dbo_tbl06141.Bank, dbo_tbl06141.Appl, dbo_tbl06141.Account,
dbo_tbl06141.Serv_code, dbo_tbl06141.Cycle, dbo_tbl06141.Charge_Code,
dbo_tbl06141_MonthEnd.Cycle, dbo_tbl06141_MonthEnd.Charge_Code
HAVING (((dbo_tbl06141.Serv_code)=7837))
ORDER BY dbo_tbl06141.Cycle DESC , dbo_tbl06141_MonthEnd.Cycle DESC;

Thanks.
 
S

Scott

I also noticed that all of my queries that I am experiencing issue with
appear in a table named "NameAutoCorrect Save Failures". Not sure if this
helps any.
 
K

KARL DEWEY

One thing I see is that you are grouping by dbo_tbl06141_MonthEnd.Cycle and
dbo_tbl06141_MonthEnd.Charge_Code but selecting dbo_tbl06141.Serv_code and
dbo_tbl06141.Cycle, dbo_tbl06141.Charge_Code.

They data may be the same but Access will not see it as the same thing.
 
J

John W. Vinson

I also noticed that all of my queries that I am experiencing issue with
appear in a table named "NameAutoCorrect Save Failures". Not sure if this
helps any.

:-{(

It helps understand... but it may not be good news!

The "Name Autocorrect" feature has earned the nickname "Name Autocorrupt".
Microsoft made a valiant effort to have it set up so that when you change the
name of a field or table or other object, that it would ferret out all the
places that name occurs and change it there too. However, Access applications
can be very complex, and names can occur in many different contexts; the code
was notorious for changing names that shouldn't have been changed and vice
versa. My guess is that some of your queries have suffered this fate, and that
the queries contain fieldnames which don't reference any actual table field.

I'm not sure how to debug this other than to open each such query, read the
SQL, and determine (hopefully from the original programmer's detailed and
accurate documentation <hah!>) what the query is supposed to do and how, and
manually correct the "autocorrupted" fieldnames.
 
S

Scott

Karl,

The query worked fine in the version of Access we had in Office XP. The
query also works fine in a separate databaase that was upgraded to Office
2007. Why would the same query work in 1 database and not another?
 
S

Scott

Thanks John.

The queries worked fine in the version of Access we had with Office XP. If
I disabled this feature in 2007 BEFORE I imported the tables, queries,
reports, etc why am I still getting an error?
 

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