Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-03-23
1
Medium Priority
?
405 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

670 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