Opening a report: Error 3211: Database Engine could not lock table

mor

Registered User.
Local time
Today, 09:01
Joined
Jun 28, 2013
Messages
56
Hello all,

I have a small problem that I would like to have some help with. I have a form that contains a subform. The subform is a datasheet which calls the results of a query of 4 tables (tbl_companies, tbl_deals, tbl_products, tbl_vl).

In the main form there is a button which opens a report with a historical record of dates of value changes of each product up to a chosen date. This chosen date is determined by inputting a date into a text box.

This report also sources (tbl_companies, tbl_deals, tbl_products, tbl_vl).
When I try to open the report, I get the run-time error "3211".

'The database engine could not lock the table "Tbl_companies" because its already in use by another person or process.'

I'm guessing that because the query for the subform is already calling the table, the query for the report can't call the table at the same time?

Does anyone know how I can get round this?

Many thanks,
MOR
 
Are you using queries for the recordsource for the sub-form and the report?
Check if the report property "Record Locks" is set to "No Locks" - Open the reports "Property Sheet" you find it in the tab "Other".
 
Thanks that worked perfectly!! What difference does it make between locking a report and not locking?
 
Thanks that worked perfectly!! What difference does it make between locking a report and not locking?
It is not the report you lock, but the table behind it, so no change can be made as long as you show the report.
And therefore you got the error, you couldn't lock it, because the form already used the table.
 

Users who are viewing this thread

Back
Top Bottom