Solved

Database engine could not lock table, already in use by another person or process

Posted on 2004-03-23
1
383 Views
Last Modified: 2006-11-17
I am trying to use the current record on a main form [tar tracking form]![account] to run a macro.   The problem is the macro that I want to run uses the tables that the form is base on so I get the above error.

Is it possible to use the current record in this fashion by changing locks, or is there a creative work around?
0
Comment
Question by:Quadeeb2003
1 Comment
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 10661286
If you macro is working on the current record, you'll have to save it or undo any changes before passing it to the macro.  Either that, or change the lock method to Optimistic (no locks), which I do not recommend.

If the macro only needs to get information from the table (as opposed to changing any data), make it open the recordset/query as non-updateable (like snapshot).

Regardless of what the macro is doing or what it needs to change, I still recommend you use VB.  You have alot more flexibility and options as opposed to the rather limited functionality of macros.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now