maketable query from will not unlock records

G

Guest

A macro, run from a button on a form, runs a maketable query, re-creating the
table underlying the form. Obviously, with the form open, this is not allowed
as the process cannot lock the table, however, even if I close the form, the
table remains locked.

I can run the sequence manually (close form, run maketable query, open
form), but when I run this as a macro I get an error "The database enginer
ould not lock table 'Table' because it is already in use by another person or
process" even though the macro has justed closed the form.

No other forms are open, no other users are using the database.

How do I get around this?
 
G

Guest

More about this: If I run the macro from the database window, all runs
smoothly. If I can it from a control on the form, it doesn't. HELP!!
 
S

Steve Schapel

Rod,

Try it like this...
Make another simple little unbound form. In the macro on the button on
your existing form, just close the existing form and open the new form.
On the Open event of the new form, put a macro that runs your
make-table query, then closes the new form, and re-opens the original
form again. Does that serve the purpose?
 
G

Guest

Hi Steve

Thank you. I had considered this, however the query is a search which uses,
as criteria, fields on the open form.

I have got around this by splitting the form into two separate forms, one
with search results and the other with the data relating to each row.

So, in part, your idea worked - putting the data onto a separate form did it.

Thanks again for taking the time to help.

Regards

Rod
 

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

Top