• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

Supress Shift Opton on Startup

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
mlcktmguy
Asked:
mlcktmguy
  • 8
  • 5
  • 2
  • +3
2 Solutions
 
Surone1Commented:
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
 
BadotzCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
mlcktmguyAuthor Commented:
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
 
Rey Obrero (Capricorn1)Commented:
<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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
mlcktmguyAuthor Commented:
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
 
BadotzCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"So far this discussion has enforced my concern over the possibility of being locked out of the database. '

See my last post :-)

mx
0
 
aikimarkCommented:
port the back-end database to SQL Server.
0
 
mlcktmguyAuthor Commented:
"port the back-end database to SQL Server"

Not an option
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
mlcktmguy:
You are making an issue out of a non-issue ... at pointed out here @ http:#a33654903

mx
0
 
aikimarkCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"JetComp "
Sometimes anyway :-)

mx
0
 
mlcktmguyAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
mlcktmguyAuthor Commented:
I feel much more confident about not getting locked out with these two methods available.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Just remember to keep a spare set of keys :-)

mx
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 8
  • 5
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now