T
Todos Menos [MSFT]
hey guys
I can't figure out why this first statement is so much shorter than
the 2nd one
Dim strSql As String
strSql = "EXEC " & QryName & "@BegDate= '" & BegDate & "',
@EndDate='" & EndDate & "'"
DoCmd.RunSQL strSql
Dim MyQuery As QueryDef
Set MyQuery = MyDB.QueryDefs(QryName)
MyQuery.Parameters("BegDate") = BegDate
MyQuery.Parameters("EndDate") = EndDate
MyQuery.Execute
Any ideas?
Thanks
-Todos
I can't figure out why this first statement is so much shorter than
the 2nd one
Dim strSql As String
strSql = "EXEC " & QryName & "@BegDate= '" & BegDate & "',
@EndDate='" & EndDate & "'"
DoCmd.RunSQL strSql
Dim MyQuery As QueryDef
Set MyQuery = MyDB.QueryDefs(QryName)
MyQuery.Parameters("BegDate") = BegDate
MyQuery.Parameters("EndDate") = EndDate
MyQuery.Execute
Any ideas?
Thanks
-Todos