Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't open my queries in Design View 1

Status
Not open for further replies.

347pg

Technical User
Jan 22, 2009
31
US
I developed a db with tables and queries which I then exported to another db. The tables have no issues. I was able to open up both tables and queries in Design View in the first db, but in the second one I get an error. The queries run ok in the second db, but I can’t view them to alter. I did not link them to the first db but exported.
The error I get says: “is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
(exactly like that, Access put the leadin " mark in there).
When I select help, the following appears.
This is not a valid name. Make sure it is a valid parameter or alias name, that it does not include invalid characters or punctuation, and that the name is not too long. (Error 3125)
The specified name does not follow standard naming conventions or is not a valid parameter or alias name. Check your entry to make sure you have not included invalid characters or punctuation and that the name is not too long.
I can open the queries in design view in the first db, but not in the second. The names are the same in both dbs. An example of one of the query name is uqryMobButtonPax.
Any ideas?
 
A quick Google seems to suggest that this is a known bug in Access, a search on MS-Access and 37769 may give you what you need.

Rosie
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong." Richard Feynman
 
Thanks Rosie
Looks like I tried to import Access 2007 tables and queries into a 2003 db. I resaved the original db in 2003 format.

There was also something about Error 3125 while I was searching, a registry error for which there are a few free downloads which supposedly correct the problem. But, although I haven't tried the import yet, I'm sure it has to do with the 2003/2007 incompatibility.

Thanks again.
 
Well I re-imported/linked my re-saved (Access 2003) db objects and I'm still getting this same error. Other than re-creating the tables, queries and forms in the destination db, does anyone have any work arounds for this error? I'm hesitant to use the registry cleaners because some reviews state that things are worse after you run them.
 
I don't know how many queries you have but you could try to recreate them. If you open any module and then select Tools->References and make sure you have the Microsoft DAO object library selected.

Press Ctrl+g to open the debug window and type in:
Code:
? CurrentDb.QueryDefs("uqryMobButtonPax").SQL

This should provide the full sql statement from the query which you can copy and paste into a new query. Delete the old query and rename the new to the old name.

This could get quite tedious if you have lots of queries. I suppose it could all be automated with some DAO code.


Duane
Hook'D on Access
MS Access MVP
 
I posted this same question on a different forum and someone named Clifford Bass gave me this response:

Hi,

I take it you are using Access 2007. There is a known bug that causes
that error. Does either any part of the path to the database, and/or the
database name itself contain a apostrophe (')? For example "C:\My
Databases\John's Data\John's Database.accdb" If so, remove them.

Clifford Bass

This ended up doing the trick. The name of my directory had an apostophe in it. When I removed it, I could open the queries in design view. I originally thought it was a problem with the queries and not the tables because I got the error when trying to open the queries. But on closer examination, the queries were imported to the db whereas the tables were linked to a db in the directory with the apostrophe in the name. Once the queries tried to open and access the tables, Error 3125 showed it's ugly head.
Appreciate all the response and help from everyone.
pw
 
Thanks for posting the issue and solution. I use naming conventions with folders that somewhat mirror my Access naming conventions. I avoid all punctuation and most spaces.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top