Using multiple parameters in querydef

G

Gibson

I am trying to use the following incomplete code to open a recordset based
on parameters. There are two parameters, each a field in the form from which
whose module this code comes from.
My question is how do I set the parameters for the code?. Obviously I can'
prm to two separate values.
Does it matter if one parameter is a text data type and the other is a
number?

Dim qdf As DAO.QueryDef
Dim prm As DAO.Parameter
Dim rsTotInv As DAO.Recordset

Set qdf = db.QueryDefs("qrytblA")

For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm

Set rsTotInv = qdf.OpenRecordset
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top