Solved

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

Posted on 2004-03-23
1
396 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 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

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

Suggested Solutions

Title # Comments Views Activity
Access Form - Button Format Issue 13 51
MS Access query 16 63
Outlook Automation in Access Using "Find" 2 59
Close gap between sub forms on a main form 5 28
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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

710 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