Results 1 to 8 of 8
  1. #1
    agelo12 is offline Novice
    Windows 11 Access 2016
    Join Date
    Dec 2024
    Location
    Greece
    Posts
    9

    After adding Maximize i get error OLE server or ActiveX Control.

    Hello everyone!
    I need some help. After adding the event procedure, i get this error:
    The form i use is NavigationWithButtonsOnLef

    Click image for larger version. 

Name:	Screenshot 2025-01-25 135525.png 
Views:	13 
Size:	19.5 KB 
ID:	52631

    The code to trying in the event procedure and in On Open is this:
    DoCmd.Maximize



    Click image for larger version. 

Name:	Screenshot 2025-01-25 154216.png 
Views:	13 
Size:	72.8 KB 
ID:	52629

    When i delete the code, the base works normally.

    Top_Menu.zip

    Thank you in advance.
    Last edited by agelo12; 01-25-2025 at 09:58 AM.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Are you even going to say where this is located?
    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
    agelo12 is offline Novice
    Windows 11 Access 2016
    Join Date
    Dec 2024
    Location
    Greece
    Posts
    9
    Sorry, I had deleted it.
    In the Event Procedures and in On Opem

    Click image for larger version. 

Name:	Screenshot 2025-01-25 154216.png 
Views:	15 
Size:	72.8 KB 
ID:	52621

    Top_Menu_1.zip

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    It might be because you have tabbed forms?
    I changed it to overlapping windows and get a small form as per design.. I then add DoCmd.Maximise and the form gets maximised.

    I was using Form1, Form 2?

    Is that an actual navigation form, as I have never used one, nor can I seem to resize it. I can however add that command without any issue. I inserted min in the form load.
    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

  5. #5
    jojowhite's Avatar
    jojowhite is online now Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    that for is Tabbed document style, so maximizing the form has no effect.
    btw, i don't encounter any error adding that code to the form.

    i also edit the form property to be Pop-up, still can't reproduce your error.

  6. #6
    agelo12 is offline Novice
    Windows 11 Access 2016
    Join Date
    Dec 2024
    Location
    Greece
    Posts
    9
    Thank you for your immediate response!
    When I click the maximize button on the top right, the form is maximized normally.
    Can you upload the form that works for you?

  7. #7
    jojowhite's Avatar
    jojowhite is online now Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    this works for me.
    Attached Files Attached Files

  8. #8
    agelo12 is offline Novice
    Windows 11 Access 2016
    Join Date
    Dec 2024
    Location
    Greece
    Posts
    9
    jojowhite thank you!

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

Similar Threads

  1. Replies: 4
    Last Post: 10-26-2018, 05:21 PM
  2. Replies: 1
    Last Post: 02-11-2018, 12:57 PM
  3. Replies: 1
    Last Post: 10-04-2016, 04:29 PM
  4. Replies: 2
    Last Post: 05-02-2016, 03:56 AM
  5. Replies: 3
    Last Post: 07-18-2013, 04:08 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