running a query when form opens

D

Don Moore

I have a combo box in a form that is controlled by another query. I would
like the query to run when I open the form. Right now the query doesn't run
until I try to look up info in the combo box. The problem is the query takes
up to 10 seconds to load so I would like to streamline the process a bit.
 
J

Jeanette Cunningham

Hi Don,
I assume that you have code that sets the row source for the combo when its
enter or got focus event is triggered.
If you want to run this code when the form opens, you can use the Load event
of the form to run that code.
Another way is to just give the combo a saved query as its row source.
It may have the effect of making the form slow to open - I haven't tried it.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top