locked table error

T

tsison7

I am trying to open a report via a control button on a form. The form is
based off of tblCustomers and the report is based off of a query which
includes tblCustomers (I think the problem is due to that).

The error I'm getting is "Run-time error '3211': The database engine could
not lock 'tblCustomers' because it is already in use by another person or
process."

The db is local so I'm the only one using it right now.

Any suggestions on how I can fix this problem?
 
N

NetworkTrade

have you tried closing that form before the report is open; as a sanity check?

even if you have to manually enter criteria into the underlying query - I
would step thru it manually to trouble shoot.....
 
T

tsison7

If I close the form and then manually open the report, the report will work
fine. Is there a way to work around this problem without having to close the
form before opening up the report?
 
N

NetworkTrade

just wondering what is not working right....

is the opening of the report creating a value change in that table; which is
already opened? that would be one cause... one would presume it is the
underlying query that is doing that.....

maybe source the form off a query rather than directly off the table...it
should be pretty fast to whip up a query that has all the table's fields and
then change the record source of the form to this new query.... not sure
what this accomplishes but might make a difference...it seems once in
Access2007 I had to do this inexplicably.....

or if there are values in that form you need to use as part of the report
opening....you could make an unbound form with unbound text boxes that serve
only the purposes of holding those values....they can autopopulate those
values when the form opens by referencing the original form before it
closes..... this will permit you to close the original form at least
temporarily, freeing up that table....but still have these values available
to you..... not very elegant. I can almost feel the mvps cringing as I type
this....but have resorted to this before and it can work......you can string
these open/closes using a macro...

you'll probably get better advice than this from someone else......
 

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