newone2011
asked on
Call database query from excel sheet
What would be the bext way to have a query run from excel sheet. I have added a button which needs to trigger the query. I have added a query as part of the connection set up.
When I hit run on the button the query resilts should show up on the worksheet.
Can someone list the steps on how to achieve this.
When I hit run on the button the query resilts should show up on the worksheet.
Can someone list the steps on how to achieve this.
ASKER
on 2007, yes I am seeing the data menu. However in my query the user need to be able put in the dates. It will be between two dates ie start date and end date. How can this be done ?
What are you querying? Access, SQL?
ASKER
SQL
So my query will be like
" select a, b, c from Test where start_date>=? and end_date <= ?
So my query will be like
" select a, b, c from Test where start_date>=? and end_date <= ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually I already created the query and added to the spreadsheet using microsfoft date query. It works very well. Can you tell me how I can use a button to just pick the start dates from rows b4 and b5
Do you want to change the query, or just do a filter on the data?
if you are using Microsoft query and want to have a parameter, just equate the fields to ?
ex.: column_param<=?
ex.: column_param<=?
ASKER
Good
Thomas