Howdy folks,
I hope someone can help me out of this little problem.
I have a query that uses parameters from a form as its criteria. What I have to do is send action emails. I have the email generate set up and works fine but what i am trying to do is create a DAO.recordset (i know i should be using ADO but im used to DAO). I have the recordset set up:
Set rsaction = db.OpenRecordset(vabQuery, dbOpenDynaset)
(vab is a varibale set up to contain the name of the query as this form runs and generates emails using two different buttons)
When i click the button to run the code i get the error message:
run-time error '3061'
too few parameters. expected 5
these 5 parameters that the query uses in criterias are text boxes on the the form the buttons are on........how do i send the parameters in a recordset.....is it using the 'querydef' function and if so how do i use it for sending more than one parameter?
Thanx for taking the time to read this.....if you need more info then ill be more than happy to supply.....if you can solve me problem then heres me thanx in advance.
hillz
I hope someone can help me out of this little problem.
I have a query that uses parameters from a form as its criteria. What I have to do is send action emails. I have the email generate set up and works fine but what i am trying to do is create a DAO.recordset (i know i should be using ADO but im used to DAO). I have the recordset set up:
Set rsaction = db.OpenRecordset(vabQuery, dbOpenDynaset)
(vab is a varibale set up to contain the name of the query as this form runs and generates emails using two different buttons)
When i click the button to run the code i get the error message:
run-time error '3061'
too few parameters. expected 5
these 5 parameters that the query uses in criterias are text boxes on the the form the buttons are on........how do i send the parameters in a recordset.....is it using the 'querydef' function and if so how do i use it for sending more than one parameter?
Thanx for taking the time to read this.....if you need more info then ill be more than happy to supply.....if you can solve me problem then heres me thanx in advance.
hillz