"is not a valid name. Make sure

  • Follow


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!
0
Reply Utf 3/17/2010 2:42:01 PM

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

-- 
Build a little, test a little.


"Scott" wrote:

> 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!
0
Reply Utf 3/17/2010 4:10:05 PM


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.

"KARL DEWEY" wrote:

> Do you have table and field names with characters other than alpha-numeric or 
> include spaces?
> 
> -- 
> Build a little, test a little.
> 
> 
> "Scott" wrote:
> 
> > 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!
0
Reply Utf 3/17/2010 4:54:01 PM

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.


"Scott" wrote:

> 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.
> 
> "KARL DEWEY" wrote:
> 
> > Do you have table and field names with characters other than alpha-numeric or 
> > include spaces?
> > 
> > -- 
> > Build a little, test a little.
> > 
> > 
> > "Scott" wrote:
> > 
> > > 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!
0
Reply Utf 3/17/2010 4:58:11 PM

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.

-- 
Build a little, test a little.


"Scott" wrote:

> 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.
> 
> "KARL DEWEY" wrote:
> 
> > Do you have table and field names with characters other than alpha-numeric or 
> > include spaces?
> > 
> > -- 
> > Build a little, test a little.
> > 
> > 
> > "Scott" wrote:
> > 
> > > 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!
0
Reply Utf 3/17/2010 7:01:01 PM

On Wed, 17 Mar 2010 09:58:11 -0700, Scott <Scott@discussions.microsoft.com>
wrote:

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

             John W. Vinson [MVP]
0
Reply John 3/17/2010 8:26:45 PM

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?


"KARL DEWEY" wrote:

> 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.
> 
> -- 
> Build a little, test a little.
> 
> 
> "Scott" wrote:
> 
> > 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.
> > 
> > "KARL DEWEY" wrote:
> > 
> > > Do you have table and field names with characters other than alpha-numeric or 
> > > include spaces?
> > > 
> > > -- 
> > > Build a little, test a little.
> > > 
> > > 
> > > "Scott" wrote:
> > > 
> > > > 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!
0
Reply Utf 3/18/2010 12:23:01 PM

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?


"John W. Vinson" wrote:

> On Wed, 17 Mar 2010 09:58:11 -0700, Scott <Scott@discussions.microsoft.com>
> wrote:
> 
> >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.
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Reply Utf 3/18/2010 12:26:15 PM

Hi - 

This is just a hunch, but the problem may be that you have fields called
'Cycle'.  Cycle is a property for forms, and from what I understand Access
2007 is a lot more fussy about the use of reserved words than previous
versions were.  Try changing those field names.

HTH

John


Scott wrote:
>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?
>
>> 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 
>[quoted text clipped - 49 lines]
>> > > > 
>> > > > Thanks!

-- 
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1

0
Reply J_Goddard 3/18/2010 7:21:43 PM

8 Replies
2933 Views

(page loaded in 0.004 seconds)

Similiar Articles:
















7/23/2012 11:35:14 AM


Reply: