Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

table lock prevents delete query from running

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
quack - 12 May 2008 00:56 GMT
Hi, I am working on a simple data entry continuous form. The user will enter
howver many data records as necessary into this form, then run a macro by
pressing a button on the form; the macro does the following:

1. closes the form
2. appends the data in the table tied to the continuous form to a master table
3. deletes the information in the table tied to the continous form

The problem I am having is when I run this macro from the form using a
command button, it fails while attempting to run the delete query. The error
message is:

"The database engine could not lock table 'MyTableName' because it is
already in use by another person or process."

However, if I run the macro from the "Macros" window in the Objects pane, it
runs as intended with no errors.

Funny thing is, though I've not much experience with Access, I've set up
forms like this one before that worked fine--so it's probably something
stupid and simple that I'm doing wrong. Anyway, any help on this matter is
greatly appreciated.
Tom van Stiphout - 12 May 2008 03:47 GMT
I'm not sure, but I would try after step 1:
DoEvents

This should ensure the form is fully closed before step 2 runs.

-Tom.

>Hi, I am working on a simple data entry continuous form. The user will enter
>howver many data records as necessary into this form, then run a macro by
[quoted text clipped - 18 lines]
>stupid and simple that I'm doing wrong. Anyway, any help on this matter is
>greatly appreciated.
quack - 12 May 2008 20:01 GMT
How do I use DoEvents exactly?

> I'm not sure, but I would try after step 1:
> DoEvents
[quoted text clipped - 25 lines]
> >stupid and simple that I'm doing wrong. Anyway, any help on this matter is
> >greatly appreciated.
Miron4ik - 12 May 2008 07:37 GMT
PPPPPPPPPPPPPPPPPPPPP
> Hi, I am working on a simple data entry continuous form. The user will
> enter
[quoted text clipped - 22 lines]
> stupid and simple that I'm doing wrong. Anyway, any help on this matter is
> greatly appreciated.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.