Not happening in order??


M

Mike

Hi,

Sorry for the rudness of this post, here is my code:

UpdateStatuslbl ("Updating Dispatching Tables...")
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryDisbyL2_ATD_All", acViewNormal, acEdit
DoCmd.OpenQuery "qryDispatched_L2_All_DupRemoval", acViewNormal, acEdit
DoCmd.SetWarnings True
UpdateStatuslbl ("Tables ready...")
UpdateStatuslbl ("")

So, above is a function I created that updates a lable on a form, then I
turn off some warnings while this append query runs (Because yes, I actually
want to populate the table with that data and I don't need bug the user about
it). Now... my problem is that it doesn't update the lable before it starts
running the queries. I have several other subs on this form that follow the
same sort of format, to give the user some (and very simple to the point of
"duuuuhh") feed back that the program is doing something.

My question: How do I get it to change the lable FIRST, then start the query?

Cheers,
 
Ad

Advertisements

P

pietlinden

Hi,

Sorry for the rudness of this post, here is my code:

    UpdateStatuslbl ("Updating Dispatching Tables...")
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryDisbyL2_ATD_All", acViewNormal, acEdit
    DoCmd.OpenQuery "qryDispatched_L2_All_DupRemoval", acViewNormal, acEdit
    DoCmd.SetWarnings True
    UpdateStatuslbl ("Tables ready...")
    UpdateStatuslbl ("")

So, above is a function I created that updates a lable on a form, then I
turn off some warnings while this append query runs (Because yes, I actually
want to populate the table with that data and I don't need bug the user about
it). Now... my problem is that it doesn't update the lable before it starts
running the queries. I have several other subs on this form that follow the
same sort of format, to give the user some (and very simple to the point of
"duuuuhh") feed back that the program is doing something.

My question: How do I get it to change the lable FIRST, then start the query?

Cheers,

stick a DoEvents command between that and the next command. That
forces the application to do complete events in sequential order
instead of asynchronously - where you don't have control over the
sequence - the application determines it for itself.
 
Ad

Advertisements


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

Similar Threads

Status Bar 0
Docmd.openquery causes error 4
Import File 1
docmd Code in report 0
Rollback doesn't work! 0
Append Query problem 2
Form Code HELP ?? 4
MAYDAY! MADAY! - Run time error 8

Top