Hi to everyone!
Here's the problem. I have two forms and each one has a button that will run the same search. The search is actually importing criteria in a query. FormA has a button named FINDCLIENT that passes the Cient_ID to the query and runs it. FormB has a button named FINDCLIENTB that does exactly the same function.
In the criteria of the query, under the CLIENT_ID field, I have written the following:
[Forms]![FormA]![CLIENT_ID]
or
[Forms]![FormB]![CLIENT_ID]
When I click on the FormA's button, it passes the value for the CLIENT_ID correctly to the query, but it also asks for the FormB's CLIENT_ID. I just click OK without entering anything in the popup box and it returns the query results correctly. The same happens with the FormB's button, but vice versa, it also asks for the FormA's CLIENT_ID. Again I click OK without entering anything in the popup box and it returns the query results correctly.
Is there a way to prevent access from asking one of the two CLIENT_IDs, depending on which button I click on? Or do I have to put up with the message and simply click on OK everytime?
Thanks in advance for your help
Alexander
Here's the problem. I have two forms and each one has a button that will run the same search. The search is actually importing criteria in a query. FormA has a button named FINDCLIENT that passes the Cient_ID to the query and runs it. FormB has a button named FINDCLIENTB that does exactly the same function.
In the criteria of the query, under the CLIENT_ID field, I have written the following:
[Forms]![FormA]![CLIENT_ID]
or
[Forms]![FormB]![CLIENT_ID]
When I click on the FormA's button, it passes the value for the CLIENT_ID correctly to the query, but it also asks for the FormB's CLIENT_ID. I just click OK without entering anything in the popup box and it returns the query results correctly. The same happens with the FormB's button, but vice versa, it also asks for the FormA's CLIENT_ID. Again I click OK without entering anything in the popup box and it returns the query results correctly.
Is there a way to prevent access from asking one of the two CLIENT_IDs, depending on which button I click on? Or do I have to put up with the message and simply click on OK everytime?
Thanks in advance for your help
Alexander