Forms Misery 2

striker

Useless and getting worse
Local time
Today, 11:36
Joined
Apr 4, 2002
Messages
65
I have built a database around a main form from which all other things are accessed. On the form there are some command buttons for reports etc, and some combo boxes used to find records quickly within the database.

This form is called up at the database start up. However to run on of the combo boxes I needed to build a new table from data within three other tables and then run a query on that table to get the combo to work.

What I wanted to do was to delete the table at database start and then rebuild it. (to save system resources)

So using the onload event I wrote some code to delete the table followed by some more code to run the queries followed by more code to run a make table query. However it cannot delete the table because i get the error message telling me that some user or process is using the table. (there are at the moment no other users)

I then tried moving the table delete procedure to the onexit event for the form after the code to close the form and it still wont delete the table (it gives the same error). I thought that the procedure was running to quick for my hardware and put a delay of up to 30 seconds in but still no joy.

Can anyone shed any light on where i am, or what is going wrong.

TIA.
 
Just out of curiosity, what is preventing you from using queries instead of a temporary table? Your DB won't bloat in size so quickly, and your data will always be up to date.
 
A good question, I tried to get the query to work with the combo box but however I tried I couldn't, so some bright spark at work said why don't you create a temporary table, so I did. I suppose had i perservered with the query I wouldn't have to have posted this question would I.

However as an interesting point i'd still love to know why the delete of the table doesn't work even though the form that refers to it is either not yet open or has just been closed.
 
For starters, your combo box is locking the table. So, until the form is closed completely and code finished running, it is still keeping the table open and then won't allow you to delete it.

I'm curious about the query question as well as DavidR. I guess if you posted the problem to begin with, you might have an answer which then would have prevented you having to post this problem
smile.gif
Just an observation.

BL
hth
 
Gee Thanks maybe when I get back to work in a couple of weeks time I'll try the query route again.

Thanks for the answer though.
 

Users who are viewing this thread

Back
Top Bottom