Results 1 to 5 of 5
  1. #1
    taxidev is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    7

    Question external accdb won't unlock

    I run a job that puts data in an external temp accdb, then I open a form in VBA and set the SourceObject to a query that hits that temp accdb. When I close the form, I set the SourceObject = "", but the laccdb file doesn't go away. If I try to run the job again, it bombs - the temp accdb is already there.



    In order to make the lock file go away, I have to completely shut down Access. I have traced the activity of the query and form, but can't find why it is getting hung up.

    Does anyone have any idea where this should be getting released?

    Thanks,
    T

  2. #2
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    Hi, welcome to AF.Net
    laccdb won't go by just setting the SourceObject of the form to "", if your db has the linked tables of external accdb file, it will remain opened unless you completely close the db.

  3. #3
    taxidev is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    7
    I don't have any attached tables. My querydef is querying the external accdb file, and that's when the lock file is generated.

  4. #4
    taxidev is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    7

    Resolved

    Thanks for looking and pondering this situation. I figured out what to do this morning.
    I changed the SQL of the querydef to run against a table in the currentdb rather than the external accdb, requeried theform, then set the source object to nothing. When the form finishes closing, the lock file is gone.

    T

  5. #5
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    Glad to hear that your problem is resolved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. converting mdb to accdb format
    By crowegreg in forum Access
    Replies: 1
    Last Post: 05-31-2011, 10:34 AM
  2. cannot change extension from accdb to accdr
    By everette in forum Access
    Replies: 4
    Last Post: 05-01-2011, 03:47 AM
  3. Accdb file differences running xp or Win7
    By 123seven in forum Access
    Replies: 1
    Last Post: 04-24-2011, 10:45 AM
  4. Replies: 0
    Last Post: 07-10-2010, 08:11 AM
  5. Replies: 0
    Last Post: 03-08-2009, 05:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums