How can I delete a linked table in Access 2007?

G

Guest

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
 
G

Guest

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


Klatuu said:
It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


Grappler said:
Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


Grappler said:
The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


Klatuu said:
It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


Grappler said:
Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


Klatuu said:
Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


Grappler said:
The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


Klatuu said:
It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


Grappler said:
"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


Klatuu said:
Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


Grappler said:
The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

Nor do I see a problem, but it does not work, which is why I asked you! Yes,
I have verified the value of "strTable", and anyway I get the same Error
warning when I do the operation manually.
--
Still Grappling


Klatuu said:
I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


Grappler said:
"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


Klatuu said:
Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


:

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

when you say manually, do you mean if you highlight the table name in the
database window and press the delete key or click delete on the tool bar you
get the error?
Is this an Access mdb database you are linked to?
Have you had the problem with any other table?
Have you been able to delete the table or does the table remain after the
error?
What happens if you rename the table?

--
Dave Hargis, Microsoft Access MVP


Grappler said:
Nor do I see a problem, but it does not work, which is why I asked you! Yes,
I have verified the value of "strTable", and anyway I get the same Error
warning when I do the operation manually.
--
Still Grappling


Klatuu said:
I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


Grappler said:
"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


:

Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


:

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
J

Joan Wild

I would create a new database and import all the objects (except tblCountries of course). Perhaps there's some corruption at play here.

--
Joan Wild
Microsoft Access MVP
Grappler said:
Nor do I see a problem, but it does not work, which is why I asked you! Yes,
I have verified the value of "strTable", and anyway I get the same Error
warning when I do the operation manually.
--
Still Grappling


Klatuu said:
I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


Grappler said:
"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


:

Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


:

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

When I say manually, I mean highlighting the table, right-click to obtain a
menu and select "delete". This results in exactly the same error. If I
rename the file, I still get the same error when I try to delete it.
Whenever the error panel appears and "OK" is clicked, the linked file
remains. The links are to an Access 2002 database with the extension ".mdb",
and I have previously had no difficulty in deleting the links using Access
2002. Now, the main database is in 2007 format with the ".accdb" extension
but the linked tables remain in ".mdb" files.
--
Still Grappling


Klatuu said:
when you say manually, do you mean if you highlight the table name in the
database window and press the delete key or click delete on the tool bar you
get the error?
Is this an Access mdb database you are linked to?
Have you had the problem with any other table?
Have you been able to delete the table or does the table remain after the
error?
What happens if you rename the table?

--
Dave Hargis, Microsoft Access MVP


Grappler said:
Nor do I see a problem, but it does not work, which is why I asked you! Yes,
I have verified the value of "strTable", and anyway I get the same Error
warning when I do the operation manually.
--
Still Grappling


Klatuu said:
I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


:

"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


:

Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


:

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
G

Guest

I agree. I would, however, try a decompile first.
See this site for info:
http://www.mvps.org/access/bugs/bugs0008.htm
--
Dave Hargis, Microsoft Access MVP


Joan Wild said:
I would create a new database and import all the objects (except tblCountries of course). Perhaps there's some corruption at play here.

--
Joan Wild
Microsoft Access MVP
Grappler said:
Nor do I see a problem, but it does not work, which is why I asked you! Yes,
I have verified the value of "strTable", and anyway I get the same Error
warning when I do the operation manually.
--
Still Grappling


Klatuu said:
I don't see a problem. Have you run it in debug mode and verified the value
of strTable?
--
Dave Hargis, Microsoft Access MVP


:

"DoCmd.DeleteObject ObjectType:=acTable, objectname:=strTable" where
"strTable" had previously been set to be = "tblCountries".
--
Still Grappling


:

Post your exact code, please
--
Dave Hargis, Microsoft Access MVP


:

The leading space was a mistake in my question but not in the original
database. I have tried to delete the table both by highlighting it in the
list of tables then selecting "delete" and by using "DoCmd.DeleteObject
acTable, 'tblCountries' " in VBA. Each time I got the same message about
invalid characters, yet I do not think I have used inavliad characters.
--
Still Grappling


:

It appears there is a leading space in the table name, which is a really,
really bad idea. I don't know if it will work, but try bracketing the name:
[ tblCountries]

Now, a word about naming. Use ONLY letters, numbers, and the underscore in
names. Do not use any Access reserved words (Date, Value, Description, etx).
Since there are words that you may forget are reserved and to be as clear as
possible as to the use of your names, use a good naming convention. Here is
a link that may be helpful:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
--
Dave Hargis, Microsoft Access MVP


:

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.
 
J

John W. Vinson

Whenever I try, I receive an error message that says: ' " is not a valid
name. Make sure that it does not include inavlid characters or punctuation
and that it is not too long.' The linked table I am trying to delete is
called: ' tblCountries' which does not appear to violate the rules.

You may have some corrupt Systems tables - have you tried Compact and Repair?
It may even be necessary to create a new database and use File... Get External
Data... Import to import everything BUT this table.

John W. Vinson [MVP]
 

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