I have a button for the user to print a few different forms filtered different ways. I use the following code to change the filtering and print the different pages then close them.
Application.Echo False
DoCmd.SetWarnings False
cDept = Null
cDept = "OPS"
SFMgmtMyDept.Requery
DoCmd.OpenForm...