Error message in queries, after upgrading from version 2003 to 200

G

Guest

In the 2003 version, my queries were working fine. Now in the 2007 version,
when I pull up one of the same queries and try to switch into Design View,
the following error is displaying:
" 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."

The following is the file name:
qrySalesbyCustomerDetail

I don't know where to start, because it was working fine before.

Thanks for any suggestions!
 
A

Allen Browne

If the SQL statement is valid (i.e. it still works in A2003), then this
should work:

1. Make a backup copy of the database while it is not open.

2. Open the database. Uncheck the Name AutoCorrect options under:
Office Button | Access Options | Current Database
Then compact the database:
Office Button | Manage | Compact/Repair

3. Open the Immediate window (Ctrl+G), and enter:
? CurrentDb.QueryDefs("qrySalesbyCustomerDetail")
Copy the SQL statement to clipboard (Ctrl+C.)

4. Create a new query.
Switch to SQL View.
Paste (Ctrl+V.)

5. Test the query. Save.
Once you have it working:
- Delete the old query.
- Compact the database.
- Rename the new query with the old name if desired.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top