Control box question

  • Thread starter Thread starter Eric Starn
  • Start date Start date
E

Eric Starn

I have a form that opens when you run a query. (example: employee last name)
Then when I want to look up another name I want to do it from the form
instead of closing the form.
So I added a control box to the form to run the query again.
The problem is that it opens up a new form, so if I do multiple searches I
will have a lot of open forms.
So the the question is: Can I set up the control box to run the query and
open it in the same form or at least close the last form when it opens a new
one?
If so how is this done?

Thanks

Eric
 
Eric,

I would put the code for closing the form at the end of the code that
re-runs the query. This is how I close my single use forms.
 
Eric Starn said:
I have a form that opens when you run a query. (example: employee last
name)
Then when I want to look up another name I want to do it from the form
instead of closing the form.
So I added a control box to the form to run the query again.
The problem is that it opens up a new form, so if I do multiple searches I
will have a lot of open forms.
So the the question is: Can I set up the control box to run the query and
open it in the same form or at least close the last form when it opens a
new
one?
If so how is this done?


Your terminology is unusual, so I'm not sure what you mean.

When you say "control box", do you mean a combo box?

What do you mean, the "form opens when you run a query"? Normally a form
would be based on the query, such that the query would be run (as the form's
recordsource) when you run the form, not the other way around. What is the
code (or macro actions) that you use to open the form?

What is the code behind the "control box" that "runs the query again"?
 
Back
Top