Hi,
I have this form that is based on a query that is a combination of a make
table query and 2 tables, what I'm trying to do is from a command button on
the form is to: Close the form, run the make tabley query and then open the
form, what happens is that when it tries to run the make table query I get an
error message saying that the table can not be locked as its in use, any
help/instructions on getting around this problem is well recieved.
MTIA
OfficeDev18 - 24 Nov 2005 17:29 GMT
Sorry, but you can't bind a form to an action query, namely a Make-Table,
Append, or Delete query; because these queries do not return records, but
rather create or modify existing recordsets. In order to do what you need, I
think - based on what I understand from your 'trying-to-do' - is to first run
the make-table query, and then open your form, which would be bound to a
Select query that ties all three tables together.
HTH
>Hi,
>
[quoted text clipped - 6 lines]
>
>MTIA

Signature
Sam
MacDermott - 25 Nov 2005 12:00 GMT
While the code behind the command button is running, the form is not
completely closed, so it looks as if it hasn't completely released its
reference to the table which is the result of your make-table query.
You *could* reset the form's RecordSource property, releasing that table,
instead of trying to close the form at all. You could then run your query,
and return the RecordSource property to its original value.
All of which sounds unnecessarily cumbersome. Make-table queries are often
a sign of poor design - why is this one necessary?
> Hi,
>
[quoted text clipped - 6 lines]
>
> MTIA
souchie40 - 25 Nov 2005 20:15 GMT
The table is necessary otherwise most of the queries would a minimum of 15
tables for the required results so I decided to do it once and then call the
table up
and I have some 15 different queries that use the table. If this sounds
cumbersome its because this is for marketing forecasts and we have 12 product
groups with a 'endless' number of products in each one
> While the code behind the command button is running, the form is not
> completely closed, so it looks as if it hasn't completely released its
[quoted text clipped - 20 lines]
> >
> > MTIA
MacDermott - 26 Nov 2005 00:50 GMT
What if you just used a SELECT query and included that in your query design,
instead of doing the make-table?
Your design still sounds a bit suspect to me -
perhaps you could give an example?
Also, since your make-table will always return the same fields (won't it?),
why not just empty and re-populate your table, instead of deleting the whole
table and re-creating it?
> The table is necessary otherwise most of the queries would a minimum of 15
> tables for the required results so I decided to do it once and then call the
[quoted text clipped - 27 lines]
> > >
> > > MTIA
souchie40 - 28 Nov 2005 10:41 GMT
If I cahnge the make table to selcet query i get an error saying to complex
to proform and thats why I want that route. Haven't tried the second
suggestion yet but will do
TIA
> What if you just used a SELECT query and included that in your query design,
> instead of doing the make-table?
[quoted text clipped - 47 lines]
> > > >
> > > > MTIA