Pausing Code Execution 
Author Message
 Pausing Code Execution

Hello,

I am trying to pause code execution.  In my code I run a
query and then open a table for editing.  Based upon the
revised table I run other queries.

How can I pause the code till we close the table.

JohnV



Tue, 22 Nov 2005 05:10:43 GMT  
 Pausing Code Execution
You can use a code similar to this

Sub WaitForTable(TableName As String)
    ' this code will be executing while
    ' table is open
    Do
        DoEvents
    Loop Until SysCmd(acSysCmdGetObjectState, _
        acTable, TableName) = 0
End Sub

and you call it like this

    Call WaitForTable("MyTable")

--
Saludos desde Barcelona
Juan M. Afan de Ribera



Quote:
> Hello,

> I am trying to pause code execution.  In my code I run a
> query and then open a table for editing.  Based upon the
> revised table I run other queries.

> How can I pause the code till we close the table.

> JohnV



Tue, 22 Nov 2005 05:39:21 GMT  
 Pausing Code Execution
Thanks, that did the trick
Quote:
>-----Original Message-----
>You can use a code similar to this

>Sub WaitForTable(TableName As String)
>    ' this code will be executing while
>    ' table is open
>    Do
>        DoEvents
>    Loop Until SysCmd(acSysCmdGetObjectState, _
>        acTable, TableName) = 0
>End Sub

>and you call it like this

>    Call WaitForTable("MyTable")

>--
>Saludos desde Barcelona
>Juan M. Afan de Ribera



>> Hello,

>> I am trying to pause code execution.  In my code I run a
>> query and then open a table for editing.  Based upon the
>> revised table I run other queries.

>> How can I pause the code till we close the table.

>> JohnV

>.



Tue, 22 Nov 2005 05:50:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Pausing code execution while another form open

2. Pause code execution while form is open

3. Pausing Code Execution - How?

4. Pausing code execution to wait for user response

5. Pause execution of VBA Code and Restarting!

6. *********PAUSING EXECUTION OF CODE!!!???PLEASE HELP!!???************

7. *******PAUSING EXECUTION OF CODE************

8. Pause VB Execution for seconds?

9. ***Getting Access 2.0 to pause in the execution of a module

10. Pausing program execution

11. Pause event execution

12. Making a pause in the execution of a form

 

 
Powered by phpBB® Forum Software