View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Lookup in Excel/Access

If you right click with the query data, you should see the "Parameters" menu
item greyed out (as you do not have any parameters yet). So select "Edit
Query", step through the wizard until you get to last step, select the 'View
data or edit query in MS Query", click finish.
Now in MS Query, click the "SQL" button and edit the query to read <Your
SQL WHERE ID=[YourParameter] (or whatever the SQL should be). Enter any
suitable value at the input box, OK and "Return data to Excel".
Now when you right click on the query data, the "Parameters" menu items will
be active. From there you can set the cell whose value you will use.

Unless any knows a simpler method ...

NickHK

"monkey harry" wrote in message
ups.com...
I've got as far as recording as a macro, whcih works Ok, but I still
can't figure out how to make it only return records depending on the
reference number in a specific cell.