Show the active query in the status bar

S

Stevie_J_D

Hi I have a Macro that has 20 consecutive OpenQuery statements - obviously
each referring to a different query.

The whole Macro take several hours to run - is it possible to show the name
of the query that is currently running in the status bar and idealy, but not
essentially, how long the query has been running for?

Thanks in advance

Stevie
 
J

John Spencer

Is this a macro? Or are you using a VBA routine?

If VBA routine, you can do this. I'm not aware of any way to do this using
a macro.

I'm assuming that you are running multiple action queries - append, update,
delete.

UNTESTED VBA snippet

Public Function fRun20Queries()
Dim dbAny as DAO.Database
Dim strQueryName as string

set dbAny = currentdb

strQueryName = "Name of First Query"
DoCmd.Echo True, strQueryName & " started at " & Time()
dbAny.Execute strQueryName


strQueryName = "Name of Second Query"
DoCmd.Echo True, strQueryName & " started at " & Time()
dbAny.Execute strQueryName

/// Repeat as needed for 20 queries ///
End Function


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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