ERROR with no direction on how to fix - " is not a valid name...

L

Laws113

when attempting to open a query in design or datasheet view, I receive the
following error message

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


soooooooooooo ok, what is it referring to? the name of the query? the
names of the tables that make up the query?

the query is called Margin Redwood Decking. how the hell is that not
appropriate/acceptable? the help/support is utterly worthless.

please help?!?!
 
R

Ron2006

What version of Access are you using?

What version of Access was used to create the app in the first place?

Ron
 
R

Ron2006

I found this as a possible solution (in microsoft Groups) {I am having
this problem and will try the answer when I get a chance)

=========================

Hi Lindsay,

If it is a 2003 or earlier database and your have Access 2003 or
earlier, you can relink the tables using the earlier version.

Alternatively, to fix it in Access 2007 do something like this:

Public Sub DealWithApostrophes()

Dim dbCurrent As DAO.Database

Set dbCurrent = CurrentDb
With dbCurrent.TableDefs("tblJohn's Table")
..Connect = Replace(.Connect, "'", "")
..RefreshLink
End With
Set dbCurrent = Nothing

End Sub

Where "tblJohn's Table" is a table in a database with a name with an
apostrophe such as "C:\John's Data\John's Data.accdb". Fix the entire
path
of the database so that there are no apostrophes anywhere. Note that
the
table name can continue to have apostrophes. Then with the above code
in a
regular (not class, form or report) module, place your cursor anywhere
inside
of the code and press F5 to run it.

Good Luck!

Clifford Bass
=======================
Ron
 
R

Ron2006

I have not attempted to try it. I was away on a quick 4 day trip to
Phoenix and on the 15th I will be on a two week vacation. So not
wanting to accidentally break something and then not being around, I
did not want to attempt the fix.

When I get back at the end of June I will try to squeeze it in. At
that same time we will be migrating about 200 systems over to Office
2007 from Office 2003 and since there are some things that may break
(filesearch being one of them) I will have to be on the alert. Plus I
having the feeling that some users will have a lot of questions about
where things are in 2007 that we have gotten used to finding in places
in 2003 that don't exist in 2007.

Ron
 
C

Clifford Bass

Hi Ron,

Very wise! If you do indeed have a back end with apostrophes in the
path or file name, 2007 will cause problems. So you will need to correct
that before converting people to 2007. The easiest way is to correct it
while in 2003. Just change the path and file name, removing all apostrophes
as appropriate, and relinking the affected tables.

Clifford Bass
 

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