[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Disable design view for most users

Posted on 2008-10-10
Medium Priority
Last Modified: 2013-11-27
I have code that runs as soon as my db is started up.  Is it possible to disable design view for most users?  

I want run:

if ENVIRON("USERNAME")  = "JOe K." then
      <enable design view>
      <disable design view>
end if

JOe K.
Question by:ClaudeWalker
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 44

Assisted Solution

GRayL earned 800 total points
ID: 22689854
I think for this you are going to have to go the route of WorkGroups and Users - providing each user with a logon that loads the appropriate workgroup file which defines his/her privileges.  Google something like - microsoft access workgroup security - for a lot of good info on this subject.  So much has already been written and is readily available - no point in re-inventing the wheel.

Author Comment

ID: 22690180

I googled it and it looks intriguing.

Is it possible to bypass the logon of the workgroup security and use ENVIRON("USER NAME") to act as the logon?

LVL 44

Expert Comment

ID: 22690484
Environ("User Name") does not exist until after the mdb has been opened.  When it comes to security, I believe it's one thing to talk the talk, but quite another to walk the talk.  It seems the first questions are always those of "What if...?" or "Is it possible to bypass...?"  ;-)
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 61

Accepted Solution

mbizup earned 1200 total points
ID: 22691134
Not as complete as workgroup security...

A possibility is to have a "Design Access" button that enables/disables the shift-key bypass option or leads to a menu where the user can choose to enable the shift-key bypass.  You can also disable the right click menus that allow a user to go from form view to design view.

You can use code like you initially posted (using the windows login) to hide or show that command button.

if ENVIRON("USERNAME")  = "JOe K." then
      YourButton.Visible = true
     YourButton.Visible = false
end if

Once the user opts to enable shift-key bypass, they will have to restart the database for that effect to take place

The code to enable/disable shift-key bypass can be found here:


Author Comment

ID: 22691528
Disabling the right click should work.  

I just don't want my boss trying to format my forms after they are done.  It will end up screwing up a database that it is linked to.
LVL 44

Expert Comment

ID: 22691812
So you have a boss who thinks he/she knows more about Forms than you do?  How does a well-designed form screw up a database?  ;-)  Good Luck!

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question