PDA

Click to See Complete Forum and Search --> : How can I control a SQL query with VB?


dfarland
May 15th, 2006, 04:30 PM
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:

manavo11
May 15th, 2006, 04:43 PM
Welcome to VBForums dfarland :)

What code do you have so far? How are you executing the query?

dfarland
May 15th, 2006, 04:46 PM
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.

manavo11
May 15th, 2006, 04:50 PM
You could do that in the SQL query, just change the Where clauses...

dfarland
May 15th, 2006, 06:36 PM
Yes, I know how to do that, but can I run that from vb? :confused: