H
happywitchie
I have a combo box on a form and when an item is selected, I want a query to
be returned with the results filtered to the selected item.
For example, when "Project2001" is selected, the returned query should only
display the data relating to Project2001.
The code I have is:
[Parent Project]=[Forms]![Reports and Queries Form]![cmbProject]
[Parent Project] is the field in the query that I need to set the filter
criteria to.
However, the above code does not work - it says that it doesn't recognise
"[Forms]![Reports and Queries Form]![cmbProject]"
Can anyone suggest what I have done wrong? Also, where do I put this code?
At the moment I have it in a macro as follows:
OpenQuery: qryProject
ApplyFilter: [Parent Project]=[Forms]![Reports and Queries
Form]![cmbProject]
Thanks
hw
be returned with the results filtered to the selected item.
For example, when "Project2001" is selected, the returned query should only
display the data relating to Project2001.
The code I have is:
[Parent Project]=[Forms]![Reports and Queries Form]![cmbProject]
[Parent Project] is the field in the query that I need to set the filter
criteria to.
However, the above code does not work - it says that it doesn't recognise
"[Forms]![Reports and Queries Form]![cmbProject]"
Can anyone suggest what I have done wrong? Also, where do I put this code?
At the moment I have it in a macro as follows:
OpenQuery: qryProject
ApplyFilter: [Parent Project]=[Forms]![Reports and Queries
Form]![cmbProject]
Thanks
hw