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  

name error



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2008, 02:50 PM posted to microsoft.public.access.queries
rdv
external usenet poster
 
Posts: 3
Default name error

I have a select query in Access 2007. It has always worked in the past, and
still works when I run it. However, when I try to switch to design view, I
get an error message which reads:

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

Again, it runs fine, it just won't let me into design view.
  #2  
Old July 17th, 2008, 03:03 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default name error

Open the Immediate Window (Ctrl+G)

Enter:
? CurrentDb.QueryDefs("Query1").SQL

Access will print out the entire query statement for you.

The create a new (blank) query, switch to SQL View, and paste the query
statement in there. Then try switching to design view.

(If it is a long query statement that runs onto multiple lines in the
Immediate Window, you may have to fix up the line endings to get the query
to work.)

Once you get it working you can delete the old query, and save the new one
in its place.

Other things that might help:
a) Make sure Name AutoCorrect is turned off:
http://allenbrowne.com/bug-03.html

b) A compact/repair may help.

c) If the SQL statement is fine but the query is not, the problem might be
with the OrderBy or Filter properties of the query. You might be able to
clear these properties programmatically, and so rescue the query. (That's
effectively what the above is doing by replacing it.)

d) Other general suggesions on rescuing a database that's not working right:
http://allenbrowne.com/recover.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rdv" wrote in message
...
I have a select query in Access 2007. It has always worked in the past,
and
still works when I run it. However, when I try to switch to design view,
I
get an error message which reads:

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

Again, it runs fine, it just won't let me into design view.


 




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 09:13 AM.


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