bfreescott
Board Regular
- Joined
- Aug 6, 2015
- Messages
- 115
I am querying a closed workbook using an ADO connection string, which includes HDR=Yes in the extended properties.
(The connection is successful.)
My query is below:
rs.Open "SELECT c FROM [sheet1$B3:L29] WHERE Award = p", Conn, adOpenDynamic
Row 3 is where my column headers reside. (Award is one of the column headers.) c and p are string variables passed to the function that runs the ADO connection.
I am getting an error on the rs.open line that no value is given for a required parameter. I assume the query is not finding a value it is expecting and my educated guess is that is has something to do with the header, but I'm not certain how to fix my query. I've also tried setting HDR to No, but got the same error.
(The connection is successful.)
My query is below:
rs.Open "SELECT c FROM [sheet1$B3:L29] WHERE Award = p", Conn, adOpenDynamic
Row 3 is where my column headers reside. (Award is one of the column headers.) c and p are string variables passed to the function that runs the ADO connection.
I am getting an error on the rs.open line that no value is given for a required parameter. I assume the query is not finding a value it is expecting and my educated guess is that is has something to do with the header, but I'm not certain how to fix my query. I've also tried setting HDR to No, but got the same error.