How to execute a query in ms access db from Excel VBA code or macro. MS-Access query accepts some parameters, that needs to be passed from Excel. Thanks
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- COALESCE, IFNULL, or NZ() function that can be use
Here is one possibility:
You can also refer in-line in the sql to a dataset from Excel.
EDIT re comments
Using a command:
See also: http://support.microsoft.com/kb/181782
This uses ADODB.
So it runs the query and puts it where you like. strQuery is the name of a query in the db or an SQL string.