Is possible to see the queries when macro is running? (1 Viewer)

Christian1977

Business Analyst
Local time
Today, 14:30
Joined
May 24, 2013
Messages
26
Dear All,

Is possible to see the queries when the macro is running?

Es. the Macro contains the queries 1,2,3 e 4

When the macro is running, will be useful see:
1) which query is running after "x" time

2) More useful see the queries run, the query is running and the queue query. (Es.: 1 e 2 run, 3 is running, 4 on queue)
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Feb 19, 2013
Messages
12,752
can be done in VBA, but don't know if it can be done in a macro

In vba it would be something like (note create an unbound textbox control called ProgressBox:


Code:
ProgressBox=""
For i=1 to 4
    Select Case i
        Case 1:
            ProgressBox="1 is running, 2,3 and 4 in queue"
            Me.Refresh
            Docmd.RunQuery "Query1"
        Case 2:
            ProgressBox="1 completed, 2 is running, 3 and 4 in queue"   
            Me.Refresh
            Docmd.RunQuery "Query2"
   etc
next i
 

Christian1977

Business Analyst
Local time
Today, 14:30
Joined
May 24, 2013
Messages
26
Hi CJ_London,

I tried the code, but doesn't work. If I find the solution, I'll post it.

Thanks and Regards,

Christian
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Feb 19, 2013
Messages
12,752
it doesn't work is not very helpful - what doesn't work?

The code does not run?, you get an error? the progressbox is not updated?
 

Christian1977

Business Analyst
Local time
Today, 14:30
Joined
May 24, 2013
Messages
26
Sorry,

I tried to put it on my DB. I create the VBA code and the unbound textbox control.
Then in the Macro I used the command "runCode". VBA is not my best and maybe there is more than one error from my side...

Regards,

Christian
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Feb 19, 2013
Messages
12,752
what happened when you ran the macro? I don't use macros myself but presumably runcode also required the name of your vba procedure?
 

Christian1977

Business Analyst
Local time
Today, 14:30
Joined
May 24, 2013
Messages
26
Hi,

first I don't know where put this code, before my queries or after. Second I've try to manage the code and Access gave me this message: "The object you referenced in the Visual Basic procedure as an OLE object isn't an OLE Object". I don't think that this method can help me. Maybe I should translate the queries on VB language
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Feb 19, 2013
Messages
12,752
For now I would put the code on a button on a form

when you have created the button, it would go in the onclick event - click on the three dot carat at the end and select code builder
 

Users who are viewing this thread

Top Bottom