Please wait msgbox while make table query running?

Morten

Registered User.
Local time
Today, 04:23
Joined
Sep 16, 2009
Messages
53
How can I show a msgbox with the text "Update in progress! Please wait a while", when I execute the following make table querye on form load?

Code:
Private Sub Form_Load()
        'Turns the Access warning messages off
        DoCmd.SetWarnings False
            DoCmd.OpenQuery "q_tblUdtræk2"
           'Turns the Access warning messages back on
        DoCmd.SetWarnings True

MsgBox "MDM Syndicator indlæst med " & DCount("*", "tblUdtræk") & " record(s)" & vbNewLine

End Sub

Best regards
Morten
 
You can't.
Create a form with this message, show it when the update start and close it when the update is finished.
 
Thanks a lot. I will try that.
 
As Mihail said -not with a msgbox.
Also, Access is single threaded ( 1 task at a time ).

The closest I have found to do something like putting up a "message" while a task is running is:

to get a pop up form non modal to display while background is searching for matches across tables. I have a label "Busy Searching" on the form. But the label is not displayed/isn't visiible until the Search completes.
I've tried putting Me.labelx.visible = true in the Load and open events with no success.
To solve this problem I added this code right after my Docmd.OpenForm "FrmBusy" line.
Code:
' Slow the processing down a bit
        For intWait = 1 To 100
            DoEvents
        Next
and now it works as intended.

Good luck with your project.
 
a stored query is "atomic". you won't get other activity/screen refreshes going on while it is in progress

you could do what you want with a normal form, though.

simply this

Code:
 docmd.openform "my progress form"
docmd.hourglass true
 
         'Turns the Access warning messages off
        DoCmd.SetWarnings False
            DoCmd.OpenQuery "q_tblUdtræk2"
           'Turns the Access warning messages back on
        DoCmd.SetWarnings True

docmd.hourglass false
  docmd.closeform "my progress form"
 
a stored query is "atomic". you won't get other activity/screen refreshes going on while it is in progress

you could do what you want with a normal form, though.

simply this

Code:
 docmd.openform "my progress form"
docmd.hourglass true
 
         'Turns the Access warning messages off
        DoCmd.SetWarnings False
            DoCmd.OpenQuery "q_tblUdtræk2"
           'Turns the Access warning messages back on
        DoCmd.SetWarnings True
 
docmd.hourglass false
  docmd.closeform "my progress form"

Thank you!
This solution is ok for me.

Best regards
Morten
 

Users who are viewing this thread

Back
Top Bottom