I have an Access db with many different queries. I tried connecting to one
of the queries from within Excel using Microsoft Query and, although I can
see the query in the table listing, when I select it to try and link to it, I
receive the "Can't access table" error message.
Has anyone come across this??
If the .mdb isn't open, open it and see if that corrects the problem.

Signature
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting
> I have an Access db with many different queries. I tried connecting to one
> of the queries from within Excel using Microsoft Query and, although I can
> see the query in the table listing, when I select it to try and link to it, I
> receive the "Can't access table" error message.
>
> Has anyone come across this??
Franklin Smith - 27 May 2008 17:21 GMT
Hello Steve,
Thanks for your email response. Regardless of whether the db is open or
not, I still get the same Microsoft Query error message, "Can't access table
<query name>". Any other suggestions?
Regards,
Franklin
> If the .mdb isn't open, open it and see if that corrects the problem.
>
[quoted text clipped - 4 lines]
> >
> > Has anyone come across this??
Franklin Smith - 27 May 2008 17:25 GMT
Hello Steve,
Thanks for your reply. I tried linking to the query with the db both open
and closed, and get the same result, the Microsoft Query error message "Can't
access table <query name>".
Any other suggestions?
REgards,
Franklin
> If the .mdb isn't open, open it and see if that corrects the problem.
>
[quoted text clipped - 4 lines]
> >
> > Has anyone come across this??
Vish - 28 May 2008 10:20 GMT
You can fixed it by modifiying field names in Access (remove space in field
names) then the export Access table. In your case, you are trying to connect
to the Access table directly, so you should try to modify the Access table's
field name structure to eliminate any spaces, and also make sure there is no
"redundancy" in field names. I hope you will not get this error again. If you
still get this error it means your database is damaged. In this case you can
use compact and repair utility or Stellar Phoenix access recovery software.
Download it:http://www.repair-access-file.com
Hope it helps..
> Hello Steve,
>
[quoted text clipped - 16 lines]
> > >
> > > Has anyone come across this??
Tony Toews [MVP] - 30 May 2008 00:45 GMT
I rather doubt this means the MDB is corrupt.
>If you
>still get this error it means your database is damaged. In this case you can
>use compact and repair utility or Stellar Phoenix access recovery software.
You also work for that company. Posting without disclosing any
connection is highly unethical and sleazy.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
lack32 - 28 May 2008 12:02 GMT
You can fixed it by modifiying field names in Access (remove space i
field names) then the export Access table. In your case, you are tryin
to connect to the Access table directly, so you should try to modify th
Access table's field name structure to eliminate any spaces, and als
make sure there is no "redundancy" in field names. I hope you will no
get this error again. If you still get this error it means you
database is damaged.
Hope it helps..
Franklin Smith;2790146 Wrote:
> Hello Steve,
>
[quoted text clipped - 12 lines]
> -
> If the .mdb isn't open, open it and see if that corrects the problem.
--
lack32
Franklin Smith - 05 Aug 2008 04:33 GMT
Thanks to everyone for the suggestions.
The issue had to do with the "dreaded" Nz function, which Access of course
likes, but Excel "chokes" on. It was the presence of that function within a
calculated field in a subquery, that made the entire query unable to be
accessed via Microsoft Query from within Excel.
Franklin
> You can fixed it by modifiying field names in Access (remove space in
> field names) then the export Access table. In your case, you are trying
[quoted text clipped - 23 lines]
> > -
> > If the .mdb isn't open, open it and see if that corrects the problem.
Bob Barrows [MVP] - 05 Aug 2008 12:04 GMT
> Thanks to everyone for the suggestions.
>
> The issue had to do with the "dreaded" Nz function, which Access of
> course likes, but Excel "chokes" on.
Not just Excel, of course: any application using ODBC or ADO to connect to a
.mdb file will fail to execute a query containing that function. And it's
not just Nz: do a search at support.microsoft.com using the keywords jet and
sandbox to see the other affected VBA functions.
In addition, user-defined functions are barred as well ... grr.

Signature
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Franklin Smith - 07 Aug 2008 17:58 GMT
Thanks very much Bob. I learned something new today....
Franklin
> > Thanks to everyone for the suggestions.
> >
[quoted text clipped - 7 lines]
>
> In addition, user-defined functions are barred as well ... grr.