Display hourglass for running queries

S

Scoop

I have a series of a/b a dozen queries that stage and import data from
a old Order Entry database into a new one with a different table
structure, etc. The queries are run in a particular sequence from a
macro. It take 7-8 minutes to run the entire macro (all the queries)
and import all the data.

I would like to display a message box with an hourglass and the name of
the current running query that updates the name of the query each time
one stops and another starts.

Can someone tell me how to do this?
 
T

TC

You could do this if you were running the queries from VBA, but I doubt
that you can do it if you are using a macro.

With VBA, you could have a form with a text field called txtMessage.
Your VBA code could open that form using DoCmd.OpenForm, then put
messages into that field, like this:

forms("TheFormName")![txtMessage] = "Running query BLAH"

Then you'd use the OpenQuery method to run the appropriate query.

I suggest that you start by converting your existing macro to VBA.
Then, once that is workimg, try adding the code to do the running
message.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
S

Scoop

Thanks! That sounds like it will do exactly what I want. I am
converting the macro over now but I when I try to run the code above, I
get Runtime error '2450' ...can't find form... but I know the form
exists and that the name is correct. Any ideas?

Also, is there a way to get a hourglass to display in the form with the
message?

Thanks again!
 

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