View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Philip Philip is offline
external usenet poster
 
Posts: 156
Default Run Access query from Excel, input value to query being value in c

Hi,

You need to add a reference to the Access Object Library (Tools..
references) then use the DoCmd.OpenQuery "qryMissingFiles" method, passing in
the query name and the parameter.

Or, my prefereed option is to use ADO with the Jet Provider to execute the
query directly.

Another alternative is to use th Excel Query tables option (in Excel, Data
menu, Get External Data...)

HTH

Philip

"Nagesh" wrote:

I have a query in Access DB which returns record(s) for a given value by
popping up a windows(parameterised query).
I want to run this query from Excel to extract one or more values by:
--having input to the query from the active cell(where cursor is placed and
from where I run this query),
--record(s) extracted to be placed in next column one below the other.

(I tried using VLOOKUP function. But this returns only one value while I
want all matchcing records to be extracted)

Not sure if this is a duplicate question though searched the list to see if
there is one that comes close. But found none.
Appreciate your response.

Thanks and good day,