PC Review


Reply
Thread Tools Rate Thread

Code to "wait" until resources released

 
 
Sandy
Guest
Posts: n/a
 
      12th Sep 2003
Hello!

I have code that takes info from three tables (not at the
same time) and puts it into separate Excel spreadsheets.
This is done via creating a temporary table first,
exporting the data and deleting the temporary table.

Problem: The smaller temporary tables delete with no
problem. The larger one, when I try to delete it with
code, returns a "still in use" message.

Is there some kind of code I can include to wait x amount
of seconds before trying to delete the larger temp table?

Any help will be greatly appreciated!

Sandy
 
Reply With Quote
 
 
 
 
Bruce M. Thompson
Guest
Posts: n/a
 
      12th Sep 2003
> I have code that takes info from three tables (not at the
> same time) and puts it into separate Excel spreadsheets.
> This is done via creating a temporary table first,
> exporting the data and deleting the temporary table.
>
> Problem: The smaller temporary tables delete with no
> problem. The larger one, when I try to delete it with
> code, returns a "still in use" message.
>
> Is there some kind of code I can include to wait x amount
> of seconds before trying to delete the larger temp table?


You might want to post your existing code so that we can see exactly what you
are doing. Something else may be causing the problem.

--
Bruce M. Thompson, Microsoft Access MVP
(E-Mail Removed) (See the Access FAQ at http://www.mvps.org/access)
>> NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<


 
Reply With Quote
 
Sandy
Guest
Posts: n/a
 
      14th Sep 2003
Hello Bruce!

Thanks for your response. I am sure the problem is the
resources are still in use because if I wait for a few
seconds and then run the code to delete the table, it will
delete; thus my request for the code.

Any ideas on the "wait" code?

Sandy

>-----Original Message-----
>> I have code that takes info from three tables (not at

the
>> same time) and puts it into separate Excel spreadsheets.
>> This is done via creating a temporary table first,
>> exporting the data and deleting the temporary table.
>>
>> Problem: The smaller temporary tables delete with no
>> problem. The larger one, when I try to delete it with
>> code, returns a "still in use" message.
>>
>> Is there some kind of code I can include to wait x

amount
>> of seconds before trying to delete the larger temp

table?
>
>You might want to post your existing code so that we can

see exactly what you
>are doing. Something else may be causing the problem.
>
>--
>Bruce M. Thompson, Microsoft Access MVP
>(E-Mail Removed) (See the Access FAQ at

http://www.mvps.org/access)
>>> NO Email Please. Keep all communications

> within the newsgroups so that all might benefit.<<
>
>
>.
>

 
Reply With Quote
 
Bruce M. Thompson
Guest
Posts: n/a
 
      14th Sep 2003
> Thanks for your response. I am sure the problem is the
> resources are still in use because if I wait for a few
> seconds and then run the code to delete the table, it will
> delete; thus my request for the code.
>
> Any ideas on the "wait" code?


Insert the following line where you want to allow the system time to process
before continuing:

DoEvents

If that doesn't do it, you can try inserting the same line again to give more
time, but, since I haven't seen your code, I really can't tell you if this is
the proper approach.

--
Bruce M. Thompson, Microsoft Access MVP
(E-Mail Removed) (See the Access FAQ at http://www.mvps.org/access)
>> NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
ie Command to Wait for "File Download" and "Save As" windows brianatee@hotmail.com Microsoft Excel Programming 11 24th Apr 2008 11:20 AM
"code 12" not enough free resources vandamme.frederik@gmail.com Windows XP Hardware 1 2nd Oct 2007 05:59 PM
PP:How to ensure "Only Compiled code" will be released prabhupr@hotmail.com Microsoft ASP .NET 1 13th Apr 2006 09:51 AM
"Please wait while Microsoft Outlook Exits" - and wait, and wait, and wait... steŠ Microsoft Outlook Discussion 5 4th Jul 2004 05:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:28 AM.