F
Franck
Hi,
Can somebody help me on the following point?
I want to use ODBC connection to another Excel file and
set up an SQL request with a QueryTable object.
The result to filter depends on IDs given by the user
in one cell of the workbook. So far so good.
My problem is that I do not know how to format the SQL
request nor write the corresponding VBA code to SQL
request several ID at the same time (outcomes as an union
of up to three IDs).
What to change to the following code?
rq = "Select * from `Table$` Where (CRD_ID=?)"
Me.QueryTables(1).Parameters.Add( "CRD_ID", xl...)
Me.QueryTables(1).Parameters(1).SetParam xlRange, Range
("A1")
Thanks a lot.
Can somebody help me on the following point?
I want to use ODBC connection to another Excel file and
set up an SQL request with a QueryTable object.
The result to filter depends on IDs given by the user
in one cell of the workbook. So far so good.
My problem is that I do not know how to format the SQL
request nor write the corresponding VBA code to SQL
request several ID at the same time (outcomes as an union
of up to three IDs).
What to change to the following code?
rq = "Select * from `Table$` Where (CRD_ID=?)"
Me.QueryTables(1).Parameters.Add( "CRD_ID", xl...)
Me.QueryTables(1).Parameters(1).SetParam xlRange, Range
("A1")
Thanks a lot.