Solved

Supress Shift Opton on Startup

Posted on 2010-09-11
19
484 Views
Last Modified: 2012-05-10
To keep users out of our backend database we have a startup form that opens when the MDB is open.  The only option it gives the user is to exit the database.  All menu's are suppressed so this really is their only option, if they get to this form.  
We have users that are opening our backend database by holding the 'shift' key at startup and changing data direclty.  They have been told over and over not to do it and most have complied.  However, I would like to eliminate the possibility.

I checked into password protecting the database, which is easy enough.  I even made a test version of the app that works with a password protected backend.  However, I have been repeatedly warned that there are many free and effective utilities for breaking the password of an Access database.

The option I am looking into now is disabling the 'Shift' key option on startup.  This is very easy to do and I have code to do it internally in the MDB and I also found an MDB that will toggle the option externally on any MDB that you choose.

I have techiniques and code to implement both the password protect option and the disable 'Shift' option so I am not asking for those.

Due to the ease of breaking the password I am leaning toward disabling the 'Shift' on startup option.

My concern is that if something goes amiss I have also locked myself out of the database and would be much worse off that I was before.  I have an external routine to toggle the 'shift' option and I will have a 'hidden' spot on the startup screen to also toggle the opton if I ever have to get in to the backend.  I am still concerend about worst case scenario, the database is having issues and I am locked out also.

Again, I am not looking for coding solutions to these two options, I have those.

I am interested in what steps the EE developers recommend in this situation and what you have done to address a similar issue.

Are my fears of being permanently locked out of my own database by supressing the 'shift' on stratup option unfounded?

0
Comment
Question by:mlcktmguy
  • 8
  • 5
  • 2
  • +3
19 Comments
 
LVL 13

Expert Comment

by:Surone1
ID: 33653174
there is software around to enable the shift option from outside the database as well.
another way is to make a secret (password protected) option to enable shift inside your project.
0
 
LVL 29

Expert Comment

by:Badotz
ID: 33653312
A Google search for "" returs 1,570,000 results. This is from the horse's mouth at:

http://support.microsoft.com/kb/826765
Function ap_DisableShift()
'This function disable the shift at startup. This action causes
'the Autoexec macro and Startup properties to always be executed.

On Error GoTo errDisableShift

Dim db As DAO.Database
Dim prop as DAO.Property
Const conPropNotFound = 3270

Set db = CurrentDb()

'This next line disables the shift key on startup.
db.Properties("AllowByPassKey") = False

'The function is successful.
Exit Function

errDisableShift:
'The first part of this error routine creates the "AllowByPassKey
'property if it does not exist.
If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, False)
db.Properties.Append prop
Resume Next
Else
MsgBox "Function 'ap_DisableShift' did not complete successfully."
Exit Function
End If

End Function

Function ap_EnableShift()
'This function enables the SHIFT key at startup. This action causes
'the Autoexec macro and the Startup properties to be bypassed
'if the user holds down the SHIFT key when the user opens the database.

On Error GoTo errEnableShift

Dim db as DAO.Database
Dim prop as DAO.Property
Const conPropNotFound = 3270

Set db = CurrentDb()

'This next line of code disables the SHIFT key on startup.
db.Properties("AllowByPassKey") = True

'function successful
Exit Function

errEnableShift:
'The first part of this error routine creates the "AllowByPassKey
'property if it does not exist.
If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, True)
db.Properties.Append prop
Resume Next
Else
MsgBox "Function 'ap_DisableShift' did not complete successfully."
Exit Function
End If

End Function

Open in new window

0
 
LVL 75
ID: 33653952
Everything you need is here:

The link below contains an MDB which allows you to 'set' and 'reset' the Shift Key Bypass from a REMOTE mdb.  It's very cool.

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html - scroll down the page to 'By Pass Shift Key Code'

More related links:
http://www.accessmvp.com/JConrad/accessjunkie/shiftkey.html

http://www.databasedev.co.uk/disable_shift_bypass.html

http://www.jamiessoftware.tk/propeditor/pe_jump.html  ' Full property editor
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 33654208
Apparently I wasn't clear when I put " Again, I am not looking for coding solutions to these two options, I have those." in my original post.

I already have everything I need to implement either option.


Are my fears of being permanently locked out of my own database by supressing the 'shift' on stratup option unfounded?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 33654289
<Are my fears of being permanently locked out of my own database by supressing the 'shift' on stratup option unfounded?>

for what you described above, (imho) the only way you can be locked out, is when the db gets corrupted. so, you must have a backup copy of the db.
0
 
LVL 75
ID: 33654292
"Are my fears of being permanently locked out of my own database by supressing the 'shift' on stratup option unfounded?

Yes.  The tool I posted will give you total control over that.  Really, try it out ... you can turn on/off shift bypass 'remotely' using that tool.

mx
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 33654622
DatabaseMX: I had and tested the tool that you suggested prior to this post.  Yes it works on an uncorrupted database.

My concern is what Capicorn1 touched on, database corruption and how suppressing the 'shift' option might bite me there.  Currently, if the database becomes corrupted I can open it to do a compact/repair, which usually resolves the issue.  Will this tool work on a corrupted database?  No real way to know that since their are many differnt ways in which a database can become corrupt.

This data is from a software product that is distributed pretty widely and I have no real control over database backup schedules.  I can suggest and recommend daily backups but not enforce or ensure their execution.

I appreciate the comments and suggestions.  So far this discussion has enforced my concern over the possibility of being locked out of the database.

0
 
LVL 29

Expert Comment

by:Badotz
ID: 33654675
You could put the database on a web server and create a front-end (web app) to restrict access. Then you could control CRUD via queries and client-supplied parameters.
0
 
LVL 75
ID: 33654903
"Currently, if the database becomes corrupted I can open it to do a compact/repair, which usually resolves the issue. "

Well, the good news is .. you do *not* have to open the db to do a C&R.  You can:

1) Use the CompactDatabase method from another DB or
2) You can use This is an EXTREMELY handy little tool, which I use daily ...  

http://www.mvps.org/access/modules/mdl0039.htm

Been using that for years.  Load it into notepad first and adjust the paths accordingly.

So ... I don't see corruption re Shift Key bypass any issue whatsoever, because I'm 99.5% sure that turning off shift key bypass does not inhibit C&R ...

mx

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 75
ID: 33654906
"So far this discussion has enforced my concern over the possibility of being locked out of the database. '

See my last post :-)

mx
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33655296
port the back-end database to SQL Server.
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 33655318
"port the back-end database to SQL Server"

Not an option
0
 
LVL 75
ID: 33657507
mlcktmguy:
You are making an issue out of a non-issue ... at pointed out here @ http:#a33654903

mx
0
 
LVL 45

Accepted Solution

by:
aikimark earned 125 total points
ID: 33657744
If there is a problem opening the database in order to do C&R, I've found that the JetComp utility can take care of the problem.
0
 
LVL 75
ID: 33657876
"JetComp "
Sometimes anyway :-)

mx
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 33658189
DatabaseMX:
"2) You can use This is an EXTREMELY handy little tool, which I use daily ...  
http://www.mvps.org/access/modules/mdl0039.htm
Been using that for years.  Load it into notepad first and adjust the paths accordingly. "

I do not have the permissions or authority to alter the registry of user machines.

You mentioned that I can "1) Use the CompactDatabase method from another DB"

How is this done?
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 125 total points
ID: 33658244
Sure ... there are two ways
Read this first for background:
http://www.trigeminal.com/usenet/usenet023.asp?1033

Method 1 - Using the Access Command line (which is what I use everyday on 25 mdb's

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\Program Files\Microsoft Office\Office\samples\northwind.mdb" /Compact

And it actually does both a Compact and Repair as of Access 2000 >>

Method 2 - CompactDatabase Method

Syntax

DBEngine.CompactDatabase olddb, newdb, locale, options, password

You can look up the full details in the VBA help file.

mx
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 33686185
I feel much more confident about not getting locked out with these two methods available.
0
 
LVL 75
ID: 33686307
Just remember to keep a spare set of keys :-)

mx
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now