Locked up

K

Kevin

I had a problem similar to this recently and resolved it
by removing the record source of the form. Your VBA should
look something like the following:

dim MyRecSource as Variant

docmd.Echo False
MyRecSource = Forms.FormName.RecordSource
Forms.FormName.RecordSource= ""

run your query by which ever method you choose

Forms.FormName.RowSource = MyRecSource
docmd.Echo True

Be carefull with Echo, if you have a problem in code
between when you turn it off and when you turn it back on,
the application will appear to lockup. In this case, you
will have to kill the process and start back up.

I hope that helps!

Kevin
-----Original Message-----
I need a subform to display results of two different
queries, both initiated from the main form.
T have changed the queries to Make Table queries, and the
subform to read the resulting table.
The table exists.
When the first query is executed, "Run-time error '3211'
The database engine could not lock
table "tblRequestedVersion" because it is already in use
by another person or process."
I closed the database and access and re-opened it and
went straight to this form and command button to make sure
that wasn't true.
 

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