I have a form to input data and on that form I have a combo box that I want to be able to select an item in the list and then only the records which have that value will I be able to navigate to using the next record buttons.
My plan to do this is to have a query which receives a parameter from the combo box:
PARAMETERS [Forms]![InspectionForm]![cmbArea] Text ( 255 );
with a where statement
WHERE ((IIf(([Forms]![InspectionForm]![cmbArea]<>"ALL"),(([Inspections].[Area])=[Forms]![InspectionForm]![cmbArea]),[Inspections].[MNumber]<>""))<>False)
My problem lies in when I open the inspection form it asks for a value for the parameter because I am using the query as the record source for the inspection form.
My ideas for solutions,
1 - Is there a way that I can set if the parameter I am "Passing" doesnt exist yet it will just bypass it?
2 - Maybe use the table instead of the query for the inspection forms record source and then before update event of the combo box write code that would filter what records could be selected. (If this is an option I dont know how to filter records without changing the record source so I would need some help there)
Any other ideas or help would be appreciated, thanks