Show message box while qury is still running

Posted on 2009-04-30
Medium Priority
Last Modified: 2013-11-28
I have a make table query and I want a message box that says" Update In progress" and then after the make table query is completed I want change the message to "Updates Done"

is this possible in vba or macro?
Question by:tvae
LVL 15

Accepted Solution

MNelson831 earned 1000 total points
ID: 24272284
Create it as a form.  Before the query runs, open the form with a text box in it that says: "Update In progress".  After the query runs, use vba code to change the text in the text box.

Something like this:

DoCmd.Openform "MyMessageForm"

'run the code here that calls your query

MyMessageForm.MyTextBox.Value = "Updates Done"

LVL 75
ID: 24272677
OR ... you can use the SysCmd ( ) function and display this message on the Status Bar:

Call SysCmd(acSysCmdSetStatus, "Update In progress ..."

' run code here

Call SysCmd(acSysCmdClearStatus)  


Call SysCmd(acSysCmdSetStatus, "Update Complete."

LVL 44

Expert Comment

ID: 24272787
If you run the query from a form, wrap the line which starts the query with:

docmd.hourglass True
docmd.runSQL queryline
docmd.hourglass False

This will turn the cursor into an hourglass as long as the query is processing.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question