Query asks for parameter, but only when opening in form
Hello,
I have a query which reads from multiple tables and uses criteria to filter on a yes/no field. It works correctly when viewing in Datasheet view, but does not work when passed in VBA code to open a form.
I believe the field names are spelled correctly, because I used the Query Design to add the field names, and as I noted, it works in Datasheet view.
When using VBA to open the form, a box pops up asking for a parameter for the Yes/No field. Regardless of what is input in the box, the form doesn't filter the view by this field.
I should note, this was working correctly until recently when I started to tinker with it. I wish I could tell you exactly what I changed to make it stop working, but I don't recall. I made edits to the query and the form. One thing I recall is trimming down the fields shown on each row of the form. I'm not sure if removing fields from the form could could cause this though? I also removed fields from the query, but the field asking for a parameter is still there.
Any ideas? I understand this is very vague and there's no way to give a step by step exact answer, but maybe there's a basic idea I could look for?
Hello,
I have a query which reads from multiple tables and uses criteria to filter on a yes/no field. It works correctly when viewing in Datasheet view, but does not work when passed in VBA code to open a form.
I believe the field names are spelled correctly, because I used the Query Design to add the field names, and as I noted, it works in Datasheet view.
When using VBA to open the form, a box pops up asking for a parameter for the Yes/No field. Regardless of what is input in the box, the form doesn't filter the view by this field.
I should note, this was working correctly until recently when I started to tinker with it. I wish I could tell you exactly what I changed to make it stop working, but I don't recall. I made edits to the query and the form. One thing I recall is trimming down the fields shown on each row of the form. I'm not sure if removing fields from the form could could cause this though? I also removed fields from the query, but the field asking for a parameter is still there.
Any ideas? I understand this is very vague and there's no way to give a step by step exact answer, but maybe there's a basic idea I could look for?
Last edited: