Results 1 to 8 of 8
  1. #1
    ScubaBart is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jul 2024
    Posts
    117

    New "Table Already Opened...." Error

    Been working on this app and have posts in a few othr threads but this is a new issue so warrants a new thread I think.

    Starting with form F_Main_Overview, I click the Button "Add / Edit Apiary Details".

    Click image for larger version. 

Name:	Button_one.PNG 
Views:	23 
Size:	21.5 KB 
ID:	52125

    This form closes and the dedicated Apiary Details window opens. No problems.

    Click image for larger version. 

Name:	Button_two.PNG 
Views:	22 
Size:	25.2 KB 
ID:	52126

    Then I click the Button "Return to Main Menu" and I receive the following error.
    Click image for larger version. 

Name:	Form_Close_Error.PNG 
Views:	23 
Size:	10.9 KB 
ID:	52127

    The macro that I use for this is exactly the same type I use to open and close other forms and this action was working prior to the latest changes to the F_Main_Overview form. (Using two continuous form sub-forms in the details of the main form.)

    Clicking on the Hive Details button and closing the window that pops up for that has the same relative sequence but no errors. And doing that after getting the error returns the normal F_Main_Overview form to normal.




    I'm missing something but I don't know what. Attached the freshest version of the file as well so others can repeat the error.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Macros are very hard to debug. I am not going to even try, as you have a bunch of them just for closing a form?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    ScubaBart is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jul 2024
    Posts
    117
    Quote Originally Posted by Welshgasman View Post
    Macros are very hard to debug. I am not going to even try, as you have a bunch of them just for closing a form?
    I consolidate similar macros into a single macro container and use the sub-macro feature to isolate the actions. Each sub-macro is for a different form. It's simply a method to organize them.

    When in the form and with the button selected, it's easy enough to expand to that specific macro action in the 'Events' tab.

    Regardless, the macro called on is pretty basic:

    Click image for larger version. 

Name:	Close_Apiary_Macro.PNG 
Views:	18 
Size:	15.6 KB 
ID:	52129

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Instead of closing the window, just hide it.

    Click image for larger version. 

Name:	VIZ.png 
Views:	19 
Size:	10.4 KB 
ID:	52130

  5. #5
    ScubaBart is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jul 2024
    Posts
    117
    Quote Originally Posted by davegri View Post
    Instead of closing the window, just hide it.
    That may be something I consider but I have somehow just solved the problem and I'm not even sure how.

    I was playing with the 'Wait for Post Processing' and 'Record' Locks' form properties on both the F_Main_Overview form and the F_Log_Apiary_Main form and the error went away. I then tried to figure out which one addressed the issue and now I can't get the error to repeat even when setting the properties back to where they started.

    So I'm not exactly sure what I did but the error is gone so I am off to the next problem.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Can't wait. :-)
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    ScubaBart is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jul 2024
    Posts
    117
    Quote Originally Posted by Welshgasman View Post
    Can't wait. :-)
    Sarcasm ? (Laughing with you)

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Well you are way ahead of me in terms of macros, so I have nothing to offer, sorry. :-)
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 4
    Last Post: 11-02-2023, 05:46 AM
  2. Simple table relationships ("faces" to "spaces" to "chairs")
    By skydivetom in forum Database Design
    Replies: 36
    Last Post: 07-20-2019, 01:49 PM
  3. Replies: 3
    Last Post: 06-06-2018, 08:26 PM
  4. Replies: 5
    Last Post: 01-12-2015, 03:44 PM
  5. Replies: 3
    Last Post: 10-23-2013, 08:10 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