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

x
?
Solved

How to launch visual basic in access with hotkey?

Posted on 2012-03-14
9
Medium Priority
?
415 Views
Last Modified: 2012-03-14
I'm trying to put in a back door to get into visual basic from a form in access. On the forms KeyDown event I want to put in code to say when Ctrl+Shift+Q is pressed it will launch Visual Basic, which is also password protected. Any idea if that can be done?

Thanks for the help!
0
Comment
Question by:SeyerIT
[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
9 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 37720128
I'm not sure about applying the password programatically, but this will open the VB Editor:

VBE.MainWindow.Visible = True
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 37720181
Any Idea on the hotkey setup?

I tried the following and couldn't get the VBE to come up;

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

     'checks to see if m is capitalized
    If KeyCode = vbKeyM And Shift = 1 Then
       
        VBE.MainWindow.Visible = True
       
    End If

End Sub


Ultimately I would like to use Ctrl+Shift+Q to open it.. Just don't know that code quite yet. Found this code above on another page.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37720199
are you trying to modify codes while the form is in "Form" view?
i suggest not to, because this might lead to form corruption.

while form in design view, just hit  Alt + F11
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 2

Author Comment

by:SeyerIT
ID: 37720223
Actually trying to create a backdoor to a module that prevents the database from being opened in Shift mode. I have to be able to get to that module to enable shift mode so that I can get back into design view for the database.

Here is a link where I started this process;

http://www.dbforums.com/microsoft-access/1008303-disable-shift-open.html
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 2000 total points
ID: 37720249
Just use a commandbutton, hidden, disguised, or password protected to run that function to toggle that property.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 37720259
Some of our applications here have tiny password protected labels that blend in with the background of the form that the dba's use to bring up an 'admin' form, which has enable/disable shift key bypass buttons and other things.

It's not 100% secure of course, but it is okay for our environment.
0
 
LVL 2

Author Closing Comment

by:SeyerIT
ID: 37720274
That will work!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37720351
FWIW.

My guess is what mbizup posted is the most straightforward technique...

Just as an FYI, You can create an AutoKeys Macro that open the VBE using a hot key.

See this sample...
Open the DB, and at any point if you press Ctrl+Shift+Q, the VBE will open.
Database1001.mdb
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 37720405
Thanks Boag. Also a good method!
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

618 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