Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ADDING HOT KEY F4 TO A FORM THAT OPENS ANOTHER FORM

Posted on 2001-06-26
7
Medium Priority
?
395 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 200 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
Independent Software Vendors: 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!

 

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

824 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