A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"is not a valid name. Make sure



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 02:42 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default "is not a valid name. Make sure

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!
  #2  
Old March 17th, 2010, 04:10 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default "is not a valid name. Make sure

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!

  #3  
Old March 17th, 2010, 04:54 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default "is not a valid name. Make sure

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.Accoun t)
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!

  #4  
Old March 17th, 2010, 04:58 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default "is not a valid name. Make sure

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.Accoun t)
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!

  #5  
Old March 17th, 2010, 07:01 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default "is not a valid name. Make sure

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.Accoun t)
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!

  #6  
Old March 17th, 2010, 08:26 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default "is not a valid name. Make sure

On Wed, 17 Mar 2010 09:58:11 -0700, Scott
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]
  #7  
Old March 18th, 2010, 12:23 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default "is not a valid name. Make sure

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.Accoun t)
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!

  #8  
Old March 18th, 2010, 12:26 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default "is not a valid name. Make sure

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

  #9  
Old March 18th, 2010, 07:21 PM posted to microsoft.public.access.queries
J_Goddard via AccessMonster.com
external usenet poster
 
Posts: 221
Default "is not a valid name. Make sure

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/For...eries/201003/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.