Van Ieperen
09-24-2007, 05:44 AM
Gents,
It seems that I've ran into a parameter handling issue that I've not learned yet, and haven't been able to find.... (Pretty novice .....)
I try to run a selection query that selects records that contain three parameters the user can select from combo boxes on a form.
The form is a continues form of this query.
In the Query, I have the criteria set up as follows:
Like [Forms]![Changedata]![TxtDescription]
Where the TxtDescription refers to the first combo box.
(And so the two others.)
The form also contains a button to activate the Query. However, when I activate it, I get the error: Too few parameters, expected 3
The code of the button starts with:
Dim Rschangedata As Recordset
Set Rschangedata = CurrentDb.Openrecordset ("Changedata")
(Where Changedata is the name of the query)
The stupid thing is, when I write the SQL code into the VBA section of the form, it works the way it should, but I would like to use the query itself.
Can somebody help me with this???
Johan
It seems that I've ran into a parameter handling issue that I've not learned yet, and haven't been able to find.... (Pretty novice .....)
I try to run a selection query that selects records that contain three parameters the user can select from combo boxes on a form.
The form is a continues form of this query.
In the Query, I have the criteria set up as follows:
Like [Forms]![Changedata]![TxtDescription]
Where the TxtDescription refers to the first combo box.
(And so the two others.)
The form also contains a button to activate the Query. However, when I activate it, I get the error: Too few parameters, expected 3
The code of the button starts with:
Dim Rschangedata As Recordset
Set Rschangedata = CurrentDb.Openrecordset ("Changedata")
(Where Changedata is the name of the query)
The stupid thing is, when I write the SQL code into the VBA section of the form, it works the way it should, but I would like to use the query itself.
Can somebody help me with this???
Johan