Hello,
If you are using Data > Get External Data > Microsoft Access, try this longer approach.
- Data > Get External Data > From other sources > From data connection wizard > Other/Advanced, click Next
- Choose the Microsoft Office 12.0 Access Databae Engine OLE DB Provider, click Next
- Provide the path to your database file in the 'Data Source' field
- Click Ok
Do you see the query listed within the Data Connection Wizard dialog now? If so, it appears the issue lies somewhere within the default driver being used for Access. You could try a repair of Access 2010.
If the queries still do not show, then there are other reasons preventing them from being displayed. Perhaps this database has user-level security or it's corrupted. You could create a new blank database, import all of the objects from the old database into
the new database container and then test using the Get External data in Excel to the new database file.
Regards,
Dennis
I was also having a very similar type of problem, but not exactly the same. In my case, I was trying to crate an Excel (Excel 2010 & Access 2010) PivotTable which would be linked to a query in an Access DB. When I get to the step where I need to select the
table or query that I want ot link to, I see ALL tables in the DB but only SOME of the queries. The query I wanted to link wasn't one of the ones displayed.
I was able to dig a little further. On one of the queries that doesn't show up, there is a field which takes a date from the source table & converts it to the week ending date (Saturday). (See Below for the code that does this). Anyway - If I remove the
week end date from the query and re-save the query under a new name, the new query will show up in the XL pivottable source selector dialog box. When I put the week end date field back in & resave under yet another new query, this new query does not show
up in the Pivottable Source selector. Obviously, there is something fishy with that week end date field.
All the queries (with & without the Week End Date) field work in Access. It's just that not all of them are showing up in the XL pivottable source selection dialig box.
The database was created back in the mid '90's in Access 2.0 but has been subsequently converted to Access 2010. My suspiciion is that somewhere along the line, Microsoft has done something to make queries which contain fields based on functions not be
visible to Excel. Probably a bug in the new 2010 security features which make Excel leery about running "code" in external data. (Just my hunch)
Query Field: Week_End_Date: WkEndDate([Date])
("Date" is the field name from the source table for this query)
Code that computes the Week end date:
Function WkEndDate(XDate As Variant) As Date Dim DayofWeek As Variant
DayofWeek = WeekDay(XDate) WkEndDate = XDate + 7 - DayofWeek
End Function
Any more hunches out there? My plan at this point is to remove the WkEndDate function & replace it with a table that takes each & every date (From 1969 on) and links that to it's appropriate week end date. Not very elegant, but at this point, I'll try
anything.