Kamis, 21 November 2013

RE: RE: [MS_AccessPros] Error 3211

 

 

Hi Bill, I did have that at the end of the procedure. Like below.
 
ExitProcedure:
    DoCmd.Hourglass False
    Set rs = Nothing
    Set db = Nothing
    Exit Sub

---In MS_Access_Professionals@yahoogroups.com, <wrmosca@...> wrote:

Phucon

 

Do you set db to Nothing at the end of the Sub? Maybe that pointer is hanging.

 

Regards,
Bill Mosca,
Founder, MS_Access_Professionals
That'll do IT http://thatlldoit.com
MS Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E

My Nothing-to-do-with Access blog

http://wrmosca.wordpress.com

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of saigonf7q5@...
Sent: Thursday, November 21, 2013 1:50 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Error 3211

 

 

When the cmdRun button is click, it runs this Sub:

Private Sub cmdRun_Click()

More code here

.

.

.

DoCmd.Hourglass True

db.TableDefs.Delete "tblTable1"  'deleting existing table

db.Execute strSql, dbFailOnError   'and creating new table with most current data

DoCmd.Hourglass False

 

More code here

.

.

.

End sub

 

It had been running ok. Then sudden, it only runs the first time, if the cmdRun is clicked again, it will generate the "Error 3211 The database engine could not lock table 'tblTable1' because it is arlready in use by another person or process."

 

I have to close the form, or close the application, even reboot  to get it back to work.

What's the possible cause? ?

 

Phucon

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar