By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

import external data from Acces into excel

P: 4
Hi I have a select query in my Access database that I want to import in to excel.
When I do this excel comes up with error msg "...Cannot find input table or query 'tPPF'...etc" The tPPF table is in the criteria for one of the fields.

1.The query works fine in Access.
2.Other queries also using tPPF table import without problem into excel
3.If I remove the criteria statment the query import without problem.

the sql for the query:
Expand|Select|Wrap|Line Numbers
  1. SELECT tConsignmentResults.*
  2. FROM tConsignmentResults
  3. WHERE (((tConsignmentResults.Month)=(DLookUp("[Month]","tPPF","[CurrentMonth] =True"))));
any ideas why this does not work whould be welcome.
Basically I am using Dlookup to find the current month code in the tPPF table, and then use resulting value to filter the month field.


Klipvis
Sep 12 '07 #1
Share this Question
Share on Google+
1 Reply


Denburt
Expert 100+
P: 1,356
I can't give you a definite response except that Excel probably doesn't like the DLookup function.

Try using a query (subquery) for the criteria and see if it works for you it is almost the same as using the DLookup function.
Expand|Select|Wrap|Line Numbers
  1.       SELECT tConsignmentResults.*
  2.       FROM tConsignmentResults
  3.       WHERE (((tConsignmentResults.Month)=(Select [Month] from tPPF Where [CurrentMonth] =True)));
  4.  
Sep 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.