Solved

ADDING HOT KEY F4 TO A FORM THAT OPENS ANOTHER FORM

Posted on 2001-06-26
7
320 Views
Last Modified: 2012-06-27
How do I add the ability from a certain form that if the user clicks F4 on that form does a DoCmd.OpenForm event?  Thanks
0
Comment
Question by:bostonroxx
7 Comments
 
LVL 1

Expert Comment

by:loosegroove
ID: 6229065
Create a new Macro and name it "AutoKeys".  Then in the new Macro click the Macro Names command bar button to shows the names for the Macros.  Under the Macro Name column enter {F4}.  Under the Action column choose Open Form.  Under the properties below choose the form you wish to open. Save the macro.

Now, everytime you press F4 the form you specified will open.

good luck,

Bronson C. Elliott
0
 
LVL 11

Accepted Solution

by:
LambertHeenan earned 50 total points
ID: 6229169
In the form that you want to be responsive to F4 (the "host form") set it's KeyPreview property to "Yes" (it's on the Event tab of the form property sheet) and then a simple KeyUp event for the host form will do what you need.

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 115 And Shift = 0 Then
    ' KeyCode 115 = F4 key pressed
         DoCmd.OpenForm "YourFormName"
    End If
End Sub
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6278093
Hi bostonroxx,

u been asking 8 Q's in 10 days, and have not graded 1.
Didn't anyone provide a correct comment?

u should follow up on your Q's. Experts put in time and effort for u, u know!

cheers
Ricky
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:bostonroxx
ID: 6291799
Just feel like giving you the points and not Paurths.  Thanks man
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6291821
ofcourse u dont have to give them to me, i did not participate in this thread... (thats obvious)

cheers
Ricky
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6291836
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6291866
i would like to ask all other experts participating in this thread to take a look : http://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20144772
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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 Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now