Is it possible to cancel a queries parameter(s) if certain conditions are met upon a form from which the report (that is influenced by the parameter query) is launched?
I have a query with 3 different parameters that are automatically answered by combo box choices a user makes on the form from which the report is launched.
I'm trying to write code that would stop the parameter query from looking to the forms combo box and in effect cancel the parameter if the user does not make a selection from one, two, or all three of the combo boxes on the form.
Here's what I have so far:
Where (TblFldA = Forms!YourForm!Combo1 OR IsNull(Forms!YourForm!Combo1)) AND (TblFldB = Forms!YourForm!Combo2 OR IsNull(Forms!YourForm!Combo2)) AND (TblFldC = Forms!YourForm!Combo3 OR IsNull(Forms!YourForm!Combo3));
With above code what I found is that it works fine when applied to only one field, or one parameter on the reports query. Yet when relating to more than one field/parameter it begins to ask you for parameters even if the field is not null.
Advance Thanks,
WF
I have a query with 3 different parameters that are automatically answered by combo box choices a user makes on the form from which the report is launched.
I'm trying to write code that would stop the parameter query from looking to the forms combo box and in effect cancel the parameter if the user does not make a selection from one, two, or all three of the combo boxes on the form.
Here's what I have so far:
Where (TblFldA = Forms!YourForm!Combo1 OR IsNull(Forms!YourForm!Combo1)) AND (TblFldB = Forms!YourForm!Combo2 OR IsNull(Forms!YourForm!Combo2)) AND (TblFldC = Forms!YourForm!Combo3 OR IsNull(Forms!YourForm!Combo3));
With above code what I found is that it works fine when applied to only one field, or one parameter on the reports query. Yet when relating to more than one field/parameter it begins to ask you for parameters even if the field is not null.
Advance Thanks,
WF