How can I control a SQL query with VB?
I would like to query a SQL db with VB that allows me to filter the data being returned. The DB is fairly large and could fill the number of rows in a excel workbook. So, I would like to change the filter with the code. Any help to get me started would be great :eek2:
Re: How can I control a SQL query with VB?
Welcome to VBForums dfarland :)
What code do you have so far? How are you executing the query?
Re: How can I control a SQL query with VB?
Haven't started it. The query will be executed with vb code, I hope. I have the query in the workbook and can refresh it. But I would like to filter the return by range of dates.
Re: How can I control a SQL query with VB?
You could do that in the SQL query, just change the Where clauses...
Re: How can I control a SQL query with VB?
Yes, I know how to do that, but can I run that from vb? :confused: