I want to pass one parameter to a saved query in MS Access 2010 and then also get the results from the query: its my saved query:
SELECT Count(*)
FROM tb_KonzeptDaten
WHERE ( Konzept=[fzg_ID] and (DCMFile is null or (DCMFile='')));
and here is my VBA code to invoke this query:
Dim db As DAO.Database
Dim qry As DAO.QueryDef
Set qry = db.QueryDefs("Test_qr_emptyDCM")
qry.Parameters("fzg_ID").Value = ID
Set rs = qry.OpenRecordset("Test_qr_emptyDCM")
also the Type of ID in VBA code is Long and the field of Konzept is Database is Long integer Why do I get this error and how can I solve it?