Solved

ADDING HOT KEY F4 TO A FORM THAT OPENS ANOTHER FORM

Posted on 2001-06-26
7
335 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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…
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…
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 …
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 …

895 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

15 Experts available now in Live!

Get 1:1 Help Now