Results 1 to 6 of 6
  1. #1
    snakatsu is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2015
    Posts
    2

    Macro to Open Form Triggers Exclusive Access Message

    I have a database that have multiple menus (forms). When I made a macro to open a menu and another data entry form, I get the "I don't have exclusive access..." message that pops up. This comes up multiple times.


    Click image for larger version. 

Name:	Access - Exclusive Access.PNG 
Views:	12 
Size:	34.4 KB 
ID:	22687

    I don't see any reason why it would give this message, since the macro is setting the form to be opened in normal view (and not design):
    Click image for larger version. 

Name:	Access - Submacro.PNG 
Views:	12 
Size:	5.0 KB 
ID:	22688

    Other menus and forms I have opening are done in the exact same way because I don't have a clue on how to program using VBA and this is just a simple tracking database for my group, so I'm trying to see if there's any help on this matter here.

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    This can happen IF someone else is in the db at the same time.
    and
    it can happen if YOU yourself are in it alone,(rare) but I get this occasionally and still dont know why.
    REMEDY:
    open the db as EXCLUSIVE so no one can interfere with your changes.

    BUT, in a shared network db, it should be split and NO ONE should be using the same db. (same front end, everyone shares the tables)
    You should have the master db on your PC only, then update all users with the updated copy.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Sometimes code and or a macro's request needs to be executed during Design Time. If your request is to make design time changes, you need to have exclusive access to the file. As mentioned, it is best to split the DB and have each user open their own front end file. Also, I avoid making design changes to files. I prefer to have them operate exclusively in a Run Time environment.

  4. #4
    snakatsu is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2015
    Posts
    2
    Tried splitting the database, and still comes up with the same message when the one form is opened. The message will pop up about 4 times before the form opens, but the form opens normally, otherwise. Because this can become an annoyance to my users, I am contemplating rebuilding the database so this doesn't happen which will take me a very long time. I didn't mention in my original post that I'm a very novice user, and only used what my co-worker helped us with before she left and the basics she was able to teach me to build this database.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    You tried splitting the database? You were not successful?

    One thing you might want to do is look for an laccdb or an ldb file in the same folder as your Access file. If nobody at any of the workstations have the file open, there should not be an laccdb or an ldb file. Go ahead and delete or move it into another folder if nobody has the file open.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    The suggestions regarding splitting the db and the ldb or laccdb are good. You can open the file with Notepad and the details might clue you in as to who has it open. You can also try to delete it regardless if anyone else has the db open and if they do, it will not allow you. Another issue that can cause this file to hang for a while is someone thinks an operation is stuck, so they force a db close and the network will not remove this file for what might be quite a while. Your problem might not be related to sharing, though.

    You call your 'menus' forms and say you're opening a menu, then a form, but you only posted what seems to apply to one of these but not both. I can't tell which the macro is for - form or menu. So perhaps the other call to open an object is the problem. Assuming I'm correct about the order of things, when do you get the message - when opening the object related to the macro details you posted, or when the other object opens?

    Add-ins can cause this problem. They can place a 'hold' on an object, and when you try to open it, there is a conflict.
    Record level locking can also cause this problem.
    If none of the clues you've received solve the issue, next time it happens, deal with the message(s) then close the object and try again. If the issue persists, that is an indication that it is somewhat consistent, so I would immediately try opening the objects manually in the same order. If this works, I think the issue is not related to multiple users and would focus on record locks, the opening parameters of each form in the sequence, and add-ins.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-28-2015, 01:51 PM
  2. Replies: 1
    Last Post: 03-08-2015, 10:35 AM
  3. Replies: 11
    Last Post: 02-18-2015, 02:30 PM
  4. Question access 2010 macro & open form
    By Grek in forum Access
    Replies: 3
    Last Post: 10-30-2011, 01:58 PM
  5. Open Exclusive Code
    By AKQTS in forum Access
    Replies: 2
    Last Post: 08-11-2011, 10:51 AM

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