Need to on off design mode for forms

QTR

New member
Local time
Today, 20:55
Joined
Dec 19, 2024
Messages
2
Hi

I am looking to hide or unhide through a command button that when i hit command button hide so the right click design mode must be disabled and same enabled after pressing another butoon with name enable
 
Hide or unhide what? A control? Lots of controls? A form? A report?

Look to modify the visible property- set to false to hide, true to unhide
 
Why would you want users to go into form design view?

Just disable the forms allow shortcut property. But this won’t stop a user opening a form in design view from the navigation window.

Provide the user with a .accde or rename your file as a .accdr
 
they can still get into design view on an .accde, just not to code. So, also rename to .accdr. That is the absolute minimum for lockdown. @isladogs has lots more information if you need to go further on his website.
 
This is what I get in an accde?
1734719943912.png
 
Don't think they can get to Design View in an ACCDE, normally. What's the secret?
No secret. Just open the db using the full version of Access holding down the shift key. they can't change anything compiled so no reports, forms, modules. But they can change tables, queries, and macros and do damage that way.
 
No secret. Just open the db using the full version of Access holding down the shift key. they can't change anything compiled so no reports, forms, modules. But they can change tables, queries, and macros and do damage that way.
Ah, okay, my bad. I was going by the topic of this thread, which was preventing the user from going to the design view of the Form, as the title says. So, I also mistakenly thought you were just addressing that. Sorry!

I just didn't want to miss out on any secrets, if there were any. Cheers!
 
Hi

I am looking to hide or unhide through a command button that when i hit command button hide so the right click design mode must be disabled and same enabled after pressing another butoon with name enable
What are you doing to prevent the user from pressing F11 to open the navigation pane?
 
No secret. Just open the db using the full version of Access holding down the shift key. they can't change anything compiled so no reports, forms, modules. But they can change tables, queries, and macros and do damage that way.

It is also possible to disable design view for tables, queries and macros in both ACCDE and ACCDB files using CommandBars.
For example, this disables design view for those objects in the nav pane:

Code:
Sub DisableNavPaneDesignView()

    With CommandBars("Navigation Pane query or macro Pop-up")
      .Controls(3).Enabled = False
    End With
   
    With CommandBars("Navigation Pane List Pop-up")
      .Controls(2).Enabled = False
    End With

End Sub

Similar code can be used to disable design view from table / query datasheets (etc). You just need to know the names and index numbers of the various command bars & their captions. Alternatively loop through all CommandBars and disable DesignView in all cases


WARNING:
Unless reversed, the changes are permanent and apply to all other databases
To prevent that, make sure you re-enable the CommandBars before closing the database.
 
Last edited:
Unless reversed, the changes are permanent and apply to all other databases
so the code is dangerous.
if you forgot you have this code and run it on autoexec macro and totally forgotten about it, you'll have a hard time figuring out why you can't edit such objects.
 
so the code is dangerous.
if you forgot you have this code and run it on autoexec macro and totally forgotten about it, you'll have a hard time figuring out why you can't edit such objects.
That would be me. :)
 

Users who are viewing this thread

Back
Top Bottom