Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qry As DAO.QueryDef

Set db = CurrentDb
Set qry = db.QueryDefs![qry2]
qry.Parameters![vendor] = "ibm"
qry.Parameters![id] = 001

Set rs = qry.OpenRecordset

docmd.openquery "qry2"

It works without setting up user-level security. If there is user-level security, then it doesn't work.

Does anybody know?
Why it doesn't work with security.