FoFa
10-25-2004, 07:23 AM
I have this code to modify a pass through query:
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As Variant
Set db = CurrentDb
Set qdf = db.QueryDefs("Dep_Check_History")
strSQL = Left(qdf.SQL, 30) ' Maintain original portion
strSQL = strSQL & " 'F36','09/01/2004','09/30/2004'" ' add parameters
qdf.SQL = strSQL
It uses DAO, and works fine (Basically making a parameter query out of a pass through).
BUT since every thing uses ADO except this, I was wondering if anyone had the ADO code to do the same thing? I can't seem to find it anywhere. I could eleminate the DAO library then, and well, I just want to know how in ADO.
Thanks
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As Variant
Set db = CurrentDb
Set qdf = db.QueryDefs("Dep_Check_History")
strSQL = Left(qdf.SQL, 30) ' Maintain original portion
strSQL = strSQL & " 'F36','09/01/2004','09/30/2004'" ' add parameters
qdf.SQL = strSQL
It uses DAO, and works fine (Basically making a parameter query out of a pass through).
BUT since every thing uses ADO except this, I was wondering if anyone had the ADO code to do the same thing? I can't seem to find it anywhere. I could eleminate the DAO library then, and well, I just want to know how in ADO.
Thanks