Message to appear until query has run.

chrisjrice

Registered User.
Local time
Today, 05:57
Joined
Mar 26, 2002
Messages
37
I want to display a please wait message on the screen until a query or print preview has completed.

I have an access form where a user selects a query using a combo box and then clicks on a command button to run the query. Some of the queries take a few minutes to run, and though an hour glass does appear whilst it is running I would also like to display a message or even better a status bar!

I am very familiar with VBA & VB so any technical help would be much appreciated.

Thanks

Chris Rice
 
Bulid a form " The query is Running"

OnClick of the combo box run a macro to open the form, run the query, close the form.

you'll probably need to repaint the form when it opens.
 
Many thanks for your speedy reply, I would have never thought of trying it this way, I was looking at a more complicated picture.

Thank you, I will give this a try. (Is there anyway this can be adapted to show a status bar?)

PS (How do you repaint a form?).

Chris Rice
 
Thanks for your time once again.

I am having a problem however. The query will not run until the form is closed on screen. The form with the message appears and then nothing happens until I close the form.

In the macro I had

Open Form
Run Query
Repaint Form
Close Form

I then tried doing it in VBA instead.

I done a Docmd.openform then a docmd.openquery and then a docmd.close

The same thing happens.

Any idea??

Thanks

Chris
 
Which form is locking it?

is it the "running query" form or the form you click to run the macro?

if it's the latter use the macro to close that form and then reopen it again at the end.
 
I have a main form with a command button which runs the macro when clicked on. The macro needs to open the message form and then run the query. What is happening is that the Macro is opening the message form but not running the query. It seems to just stop after the message form has been opened, until you manually close the message form on the screen. Once you manually close the form the macro then carries on and opens the query.

Hope that makes more sense.
 
You need to have the macro order like this

Open Form
Repaint Form
Run Query
Close Form


Give that a go!
 
Magic!!!! It worked... Thanks very much for all your time. You are a star.

Cheers

Chris
 

Users who are viewing this thread

Back
Top Bottom