I have been reading how I can pass parameters to a query using VBA but am struggling to find an example I fully understand.
So say I have a form that when opened by one user, the parameter for a yes/no field is false but for another I would want it to be true, how would I change that on the go? Would I set a parameter via the parameter window and add that field as a yes/no? Would I make the criteria for that field a global variable that during my forms on open event determines if it should be true or false? Or is there another method I am not thinking of? The next step would be how would you do the same for a form whos record source is a query that was built in the form and not a separately saved query?
I am just having a hard time wrapping my head around it.
So say I have a form that when opened by one user, the parameter for a yes/no field is false but for another I would want it to be true, how would I change that on the go? Would I set a parameter via the parameter window and add that field as a yes/no? Would I make the criteria for that field a global variable that during my forms on open event determines if it should be true or false? Or is there another method I am not thinking of? The next step would be how would you do the same for a form whos record source is a query that was built in the form and not a separately saved query?
I am just having a hard time wrapping my head around it.