Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to import external data into Excel from Access using the database
query technique. I have recorded a macro that pulls in data based on specific criteria, the following is the criteria I have used: "WHERE (Access_data.NAME='Mr Smith') AND " , "(Access_data.LOCATION='UK')") This works sucessfully (and returns four records) but what I need to do is replace the 'hard coded' criteria with varaibles, like this: v_name = "Mr Smith" v_loc = "UK" "WHERE (Access_data.NAME=v_name AND " , "(Access_data.LOCATION=v_loc)") This method does not return any records becasue I am using variables. If I hard-code the variables the query works. How can I successfully get external data from an Access database using variables as selection criteria? Thanks RTP |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get External Data from Access Parameter Query | Excel Discussion (Misc queries) | |||
MONTHNAME when getting external data from Access | Excel Worksheet Functions | |||
Retrieving External Data from Access into Excel | Excel Programming | |||
Retrieving External Data from Access | Excel Programming | |||
external data access problem | Excel Programming |