Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1773
  • Last Modified:

" is not a valid name

I receive the following error message when attempting to open about 50 % of my queries in design after upgrading to Access 2007 from Access 2003.

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

I've tried the compact/repair without success.  I also created a blank database, then imported the objects from the originall db without success.  Would appreciate any assistance you can give me.  I tried the above suggessions after reading previous posts but had no luck.
0
wmb02
Asked:
wmb02
  • 4
  • 3
  • 2
  • +1
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"I also created a blank database, then imported the objects from the originall db without success."

Try this .... import ALL of the Tables *first* ... and then queries, etc.

mx
0
 
ducky801Commented:
How many Queries do you have?  Would it be feasible to re-create them by:
In the old database, open each query in design view, click View, choose SQL View, hightlight and copy the code out
in the new database, start a new query in design view, click View, choose SQL view, paste in your SQL code
 
Is there any way you can post both your old and new databases?
0
 
wmb02Author Commented:
I will try both suggestions and will let you know the outcome.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
wmb02Author Commented:

Hello, thanks for your help.  I did try to import just the tables first&.  And I am not able to open the problem tables in SQL view or design view&  thanks.
0
 
ducky801Commented:
You won't be able to open tables in SQL view.  Only the queries.  Your post seemed to me that you were having problems with just your queries.  Any chance you can post your databases?  or at least their structure (take all of the data out)?
 
AR
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"
" is not a valid name"

Have you opened one of there queries in design view to see what's up?  Do you see a lot of Expr1, Expr2, etc ?

mx
0
 
wmb02Author Commented:
I can't even open the query.  Whenever I try opening the query I receive the error message:
" is not a valid name. Make sure that is does not include invalid characters or punctuation and that it is not too long.
 
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
OK .... go back to your A2003 master and run the procedure below first.  Fix any errors you may encounter.     Then, create a new ACCDB and Import all objects into the new ACCDB from the 'clean' MDB.

A **DeCompile** may help here ...

But first, if you have not already:
Open the VBA Editor and from the menu ...Tools>>References ....
If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
you need to fix that first.

Then, follow this procedure:

****
0) **Backup your MDB BEFORE running this procedure**
****
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
Close the mdb after the Compact & Repair.
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Close the mdb.
6) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
       >>Debug>>Compile
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

7) Close the mdb
8) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) before executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:

http://www.trigeminal.com/usenet/usenet004.asp?1033

mx

0
 
wmb02Author Commented:
Used some of the suggestions, however suggestions didn't completely resolved my issue.  PLEASE CLOSE QUESTION.
0
 
KelzudCommented:
Access does not permit illegal characters in the file path or name.  The list below applies to web Access, but I believe that it also impacts desktop Access:

    Brackets ([])
    Forward slash mark (/)
    Backward slash mark (\)
    Ampersand (&)
    Tilde (~)
    Question mark (?)
    Asterisk (*)
    Pipe or vertical bar (|)
    Angle brackets (<>)
    Quotation marks (")
    Number sign (#)
    Semicolon (;)
    Colon (:)
    Plus (+)
    Period (.)
    Two periods (..)

Please see the following article (based on web Access) for more information:
http://support.microsoft.com/kb/256385

I have the same problem as you, and as my userID for my company computer is firstname.lastname I will always have this error.  That is unless there is a way to suppress the message through VBA or an application setting for suppressing error messages that arise from the application and not VBA.

Until then I have taken heart that while the error does appear, functionality after clicking okay is not affected in my case and I am able to perform filters, etc., without hindrance.

Cheers,
K
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now