Solved

Disable design view for most users

Posted on 2008-10-10
6
686 Views
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>
else
      <disable design view>
end if

Thanks,
JOe K.
0
Comment
Question by:ClaudeWalker
[X]
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
6 Comments
 
LVL 44

Assisted Solution

by:GRayL
GRayL earned 200 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.
0
 

Author Comment

by:ClaudeWalker
ID: 22690180
Thanks,

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?




0
 
LVL 44

Expert Comment

by:GRayL
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...?"  ;-)
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 61

Accepted Solution

by:
mbizup earned 300 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
else
     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:

http://office.microsoft.com/en-us/access/HA012327171033.aspx?pid=CH100728931033
0
 

Author Comment

by:ClaudeWalker
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.
0
 
LVL 44

Expert Comment

by:GRayL
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!
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

696 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