ADDING HOT KEY F4 TO A FORM THAT OPENS ANOTHER FORM

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
bostonroxxAsked:
Who is Participating?
 
LambertHeenanCommented:
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
 
loosegrooveCommented:
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
 
PaurthsCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
bostonroxxAuthor Commented:
Just feel like giving you the points and not Paurths.  Thanks man
0
 
PaurthsCommented:
ofcourse u dont have to give them to me, i did not participate in this thread... (thats obvious)

cheers
Ricky
0
 
PaurthsCommented:
0
 
PaurthsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.