Solved

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

Posted on 2004-03-23
1
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

630 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