I have an existing query which a continuous form is based on. On the form I have just added a combo box from which a user can select an agent number.
What I want to be able to do is use the agent number selected to add a where clause to the query from code etc.
For example if the recordsource of the continuous form is set to a query (qselDetails) that reads
Select * from tblMain (The real query is a lot more complicated!)
And then the user selects and agent from the combo box on the form, is there a way I can add this where clause to the query without created the query sql and using the query name and passing the where clause to it so it is something like
Select * from tblMain WHERE agentno = 720
queryDef?
query Filter?
Help appreciated.
What I want to be able to do is use the agent number selected to add a where clause to the query from code etc.
For example if the recordsource of the continuous form is set to a query (qselDetails) that reads
Select * from tblMain (The real query is a lot more complicated!)
And then the user selects and agent from the combo box on the form, is there a way I can add this where clause to the query without created the query sql and using the query name and passing the where clause to it so it is something like
Select * from tblMain WHERE agentno = 720
queryDef?
query Filter?
Help appreciated.