I am looking for a VBA codes of how to change a saved query criteria by button click from a form, button click is to open a report eventually.
Report's data source = Query1 with Field1, Field2.....etc is joined by Table1 and Table2.
Field2 in Query1 is a CheckBox from Table1.
I like to hv VBA codes on button click to replace Field2 query criteria from NULL(blank criteria) to -1 OR -1 to NULL(blank criteria) depends on user's discretion.
Can anyone shed some lights plz.