View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default "Looking Up" Access from Excel using SQL.REQUEST

Have you tried putting in a user id and password

'C:\Program Files\Microsoft
Office\OFFICE11\LIBRARY\MSQUERY\XLODBC.XLA'!SQL.RE QUEST("DSN=MS Access
Database;DBQ=C:\Northwind.mdb;UID=Duncan;PWD=abcd" ,,,"SELECT ProductName
FROM Products WHERE
(ProductID=5)")

--
Regards,
Tom Ogilvy


"Duncan Davies" wrote:

Hi,

I am trying to "lookup" values in a secured Access database from Excel using
the SQL.REQUEST function. When the database is not secured the function works
perfectly, but as soon as I apply User-Level Security it doesn't work.

Using the sample database "Northwind" as an example, the format of my
function is as follows:

'C:\Program Files\Microsoft
Office\OFFICE11\LIBRARY\MSQUERY\XLODBC.XLA'!SQL.RE QUEST("DSN=MS Access
Database;DBQ=C:\Northwind.mdb",,,"SELECT ProductName FROM Products WHERE
(ProductID=5)")

Regards,
D.Davies