close query results before update

  • Thread starter Thread starter papa jonah
  • Start date Start date
P

papa jonah

I have a form that I use to input criteria for a query. The inputs
are in the form of comboboxes.
It works great.
Of course when I enter the criteria and hit the go button, a window
pops up with the results of the query. If I want to change my selected
criteria it will not work unless I first close the query results
window. The query is called Division Type Query. Is there code I can
add to the before update that will say something like
If division type query window open then
close
end if

?

TIA
 
Maybe toss out a close before trying to open again. Trap for the unopened
condition, of course.

on error resume next
docmd.close acQuery, "QueryName"
on error goto 0
 
Back
Top