Dan Waterloo
Well-known Member
- Joined
- Jan 4, 2007
- Messages
- 876
I'm trying to use MS Query in Excel to extract data from an MS Access database on a network drive. That is, I go to a clear sheet in an Excel workbook and then using the menu system say,
and create the query. I have no problem doing this. It's a parameter query that depends on the value in cell A1 of the sheet that I have the query in.
My problem is that I want to distribute this workbook to an audience of people who have to the network drive that the Access database resides on but who likely have mapped to it using a different drive letter than I have.
How do I refer to the database using a UNC address rather than the default letter drive address?
MS Query generates this sort of SQL, referring to the T drive:
I can edit it to
but when I try to introduce a parameter it balks.
Code:
Data > Import external data > New Database Query
My problem is that I want to distribute this workbook to an audience of people who have to the network drive that the Access database resides on but who likely have mapped to it using a different drive letter than I have.
How do I refer to the database using a UNC address rather than the default letter drive address?
MS Query generates this sort of SQL, referring to the T drive:
Code:
SELECT ListActivity.ActivityDescription, ListActivity.ActivityName, ListActivity.ActivityRE, ListActivity.ActivityStatus, ListActivity.ActivityType
FROM `T:\MOS Application`.ListActivity ListActivity, `T:\MOS Application`.ListAssignment ListAssignment
WHERE ListActivity.ActivityID = ListAssignment.AssignActivityID
I can edit it to
Code:
SELECT ListActivity.ActivityDescription, ListActivity.ActivityName, ListActivity.ActivityRE, ListActivity.ActivityStatus, ListActivity.ActivityType
FROM [\\ca.mycompany\genericdirectory\MOS Application].ListActivity ListActivity, [\\ca.mycompany\genericdirectory\MOS Application].ListAssignment ListAssignment
WHERE ListActivity.ActivityID = ListAssignment.AssignActivityID
but when I try to introduce a parameter it balks.