Solved

Enable shift override after converting from Access 2003 to Access 2007

Posted on 2010-09-02
12
452 Views
Last Modified: 2012-06-27
I have an Access 2003 application that I inherited, but I want to convert it to 2007.  It has a back end and front end.  When I convert the front end by using the Convert option in 2007, it opens .accdb right after conversion, but if I close it and try to re-open the project by holding the shift key while opening, I still get the opening form.  It won't bypass the code and open the project.

I don't really think that shift has been turned off because I never had this issue in 2003, only after converting to 2007.

Any help would be appreciated.
0
Comment
Question by:wlreimer
  • 6
  • 4
  • 2
12 Comments
 
LVL 10

Accepted Solution

by:
t_hungate earned 500 total points
ID: 33587315
Have you gone into the options>Current DB, and made sure that there is a check in the box next to Use Access Special Keys?

TLH
0
 
LVL 10

Assisted Solution

by:t_hungate
t_hungate earned 500 total points
ID: 33587389
This may also help you with your problem.  The shift key or bypass key can only be enabled and disabled via VBA.

http://msdn.microsoft.com/en-us/library/aa140020.aspx

TLH
0
 
LVL 10

Assisted Solution

by:t_hungate
t_hungate earned 500 total points
ID: 33587516
This code should take care of it if the other options that I provided do not pan out.

Courtesy of Access Freak.com  - http://www.access-freak.com

Public Function SetAllowBypassKeyTrue()

'----- Setup Error Handler
On Error GoTo Err_SetAllowBypassKeyTrue

'----- Dimension (Variable Declaration)
Dim db As DAO.Database, prp As DAO.Property

'----- Set AllowBypassKey property if it exists
Set db = CurrentDb

db.Properties("AllowBypassKey") = True

Set db = Nothing

'----- Exit Label
Exit_SetAllowBypassKeyTrue:

Exit Function

'----- Error Handler
Err_SetAllowBypassKeyTrue:

'----- Property not found error
'----- Create property if it does not yet exist
If Err = 3270 Then  

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True)
db.Properties.Append prp

Resume Next

Else

'----- some unspecified error occurred
MsgBox "SetAllowBypassKeyTrue", Err.Number, Err.Description

Resume Exit_SetAllowBypassKeyTrue

End If

End Function


The above code needs to be executed only once within the application to set the property.  Keep in mind this method can also be used to turn the AllowBypassKey option to false as well.


TLH
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:wlreimer
ID: 33588424
Ok, I tried to do this in the immediate window but get a Compile error: Invalid in Immediate pane.  Where else would I run it from?
0
 

Author Comment

by:wlreimer
ID: 33588449
Interestingly enough, it appears that I am able to open the project until I create an accde.  Once I create the .accde I can no longer open the .accdb either, it goes right to the startup form.  Could there be something in 2007 that is programmatically turning off the Access Special Keys or disabling the shift override at the time a .accde is created?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33588604
Did you try t_hungate's first suggestion?
What was the result?

Did you try t_hungate's second suggestion?
What was the result?


First, run the compact repair utility in Access 2003 on the 2003 database, just to make sure everything is OK in the 2003 database, *before* you convert the DB.
If you try this, does it make any difference?

What is triggering the Opening form?
The Current Database Display Form setting, or an autoexec macro?

JeffCoachman
0
 

Author Comment

by:wlreimer
ID: 33589367
Did you try t_hungate's first suggestion?
What was the result?
Yes, (it was not checked initially), can open until I create an accde with it..

Did you try t_hungate's second suggestion?
What was the result?
Yes, same as above.


First, run the compact repair utility in Access 2003 on the 2003 database, just to make sure everything is OK in the 2003 database, *before* you convert the DB.
If you try this, does it make any difference? This was the first thing that I tried.

What is triggering the Opening form?
The Current Database Display Form setting, or an autoexec macro?
AUTOEXEC Macro

AFTER A LITTE MORE TESTING: IT'S NOT CREATING THE ACCDE THAT'S CAUSING THE PROBLEM.  IT'S ALLOWING THE ACCDB TO LAUNCH WITHOUT THE SHIFT KEY THAT'S CAUSING IT.  IF I HOLD DOWN SHIFT AS I CREATE THE .ACCDE THE PROJECT REMAINS OPEN AND I CAN REOPEN AFTER.  IF I DOUBLE CLICK THE ACCDB EVEN ONCE, IT'S LOCKED UP.   ORIGINALLY I WASN'T HOLDING SHIFT WHEN CREATING THE ACCDE AND IT WOULD LAUNCH THE APP AS IT COMPLETED THUS LOCKING IT.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33589733
Then would disabling the Autoexec macro, then converting the database have helped?
0
 

Author Comment

by:wlreimer
ID: 33589777
I found it.  There was a string of code in the specified form telling it to disable special keys.  Interesting that it didn't really do anything in 2003, but did in 2007.  Thanks for all of your help, I wouldn't have found it otherwise.  How do I give boag2000 credit?
0
 
LVL 10

Expert Comment

by:t_hungate
ID: 33589851
Click on the yest, next to the solution that you found helpful.
0
 

Author Closing Comment

by:wlreimer
ID: 33590018
Thanks for everything, you guys always save me a ton of time.
0
 

Author Comment

by:wlreimer
ID: 33590025
Sorry, I really meant t hungate.  It was your help that did it.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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 …

778 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