[AccessD] Running Access Query With Parameters From VB6

Gustav Brock Gustav at cactus.dk
Mon Mar 21 06:05:58 CST 2005


Hi Paul

That's what I guessed.
If you copy and paste 

  qryKPI_SickDays_By_Region_By Month3 '01/01/05', '31/01/05'

into an empty query in SQL desing view, you'll see it have no idea what
to do with it.
You will need to revise your code to generate some SQL code.

/gustav


>>> paul.hartland at fsmail.net 03/21 12:51 pm >>>

it evaluates to 
strSQL = qryKPI_SickDays_By_Region_By Month3 '01/01/05', '31/01/05'

which is inside Set rsKPIData = OpenDataConn.Execute(strSQL)



Message date : Mar 21 2005, 11:42 AM
>From : "Gustav Brock" 
To : accessd at databaseadvisors.com 
Copy to : 
Subject : Re: RE: [AccessD] Running Access Query With Parameters From
VB6
Hi Paul

It is the result of this expression we need:

strQueries(intQuery) & " '" & dtKPIStart & "', '" & dtKPIFinish &
"'"

/gustav

>>> paul.hartland at fsmail.net 03/21 12:26 pm >>>
Just an error message like below:
Run-time error '-2147217900
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE',
'SELECT' or
'UPDATE




More information about the AccessD mailing list