ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   db query with dynamic criteria (https://www.excelbanter.com/excel-discussion-misc-queries/66126-db-query-dynamic-criteria.html)

Stanley

db query with dynamic criteria
 
I need to be able to run a query from a cell to pull in 1 bit of data for a
particular date. I would like to be able to just call a funciton if possible
and pass it the date:
=GetData(A12)

In return I would get data from the Access database. I can't seem to find
any info on any of it except to populate a spreadsheet with all of the data
returned, but I only need one record and really only one field from that
record.

Stanley

db query with dynamic criteria
 
Not sure if it is the best way but I went back to just using ADODB and a
recordset. It works and works quickly.

-Stanley

"Stanley" wrote:

I need to be able to run a query from a cell to pull in 1 bit of data for a
particular date. I would like to be able to just call a funciton if possible
and pass it the date:
=GetData(A12)

In return I would get data from the Access database. I can't seem to find
any info on any of it except to populate a spreadsheet with all of the data
returned, but I only need one record and really only one field from that
record.



All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com