Query Access then cycle results using Excel VBA

big_c_2006

New Member
Joined
Oct 13, 2006
Messages
3
I am wondering if there is a way to query access with a range, then return all values that match this query. Is there some sort of next command that can be used? or can you use a variable with the () at the end (brain forgot the proper word for it) to simple add all values the query finds? As well, this will be done in Excel VBA
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
What exactly do you mean?

Do you want all the values in the range to be the criteria for the query?

Or do you want to run a query with each individual value as the criteria?
 
Upvote 0
I want to run a query for a specific value in a column within an access database. using the Select var Where ____ command I know I can return a single value. There will be multiple values in the access database that match this query. I want the program to return all of these values. The problem I am having is that I am yet to learn how to return more than 1 value from an access query.

I am wondering if a loop is necessary or if there is a function within the ADODB commands that allows you to get the next value that matches the query.

so basically, there will be a single search criteria but there will be many values in the access database that are within this subset.

hopfully this makes more sense!
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,207
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top