Solved

Enable shift override after converting from Access 2003 to Access 2007

Posted on 2010-09-02
12
468 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
[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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

742 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