Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Enable shift override after converting from Access 2003 to Access 2007

Posted on 2010-09-02
12
Medium Priority
?
483 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 2000 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 2000 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 2000 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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