I have a form that is displayed when I run a query via a macro. The form is supposed to be tabular and display all the results of the query itself in that form. I want a command button or a double click event on the tabular form that will bring up the specified record. The below code is for a command button but when I click it; it will bring up the form but once I close out of that form and try to open another one it doesn't work. Am I missing something here? Thanks!
DoCmd.OpenForm "FormName", , , "[Dept ID]=" & Me![Dept ID]
DoCmd.OpenForm "FormName", , , "[Dept ID]=" & Me![Dept ID]