How use F4 instead of Dbclick

G

Guest

Hi All..

I Have this code, it's work fine but I want to use F4 instead od DbClick
fuction, could you help me please how to do this.

Thanks.

------------------------------------------------------------------------------------------------
Private Sub List11_DblClick(Cancel As Integer)
[ModANDSize SubForm]![Cut Sheet] = [CUTS]
[ModANDSize SubForm]![ModeloANDsizeInfo] = "G:" & [Combo6].Column(1) & " "
& [List0] & " " & [List2].Column(1) & " " & [List4].Column(1) & "(" &
[List11].Column(1)
[ModANDSize SubForm]![Qty] = [List4]
[ModANDSize SubForm]![Text7] = [pkt]
DoCmd.GoToControl "ModANDSize SubForm"
DoCmd.GoToRecord , , acNewRec
List11.SetFocus



End Sub
 
S

Steve Schapel

Idiaz,

I think you can use the KeyDown event of the form for this. Something
like this...

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF4 Then
<... your code here...>
End If
End Sub
 
G

Guest

Thank you Steve,

that asnwer was I was looking for..Thank you..
since I'm a CAD designer I don't know so much of Access.

Thanks again.
Ldiaz
--
Lorenzo Díaz
Cad Technician


Steve Schapel said:
Idiaz,

I think you can use the KeyDown event of the form for this. Something
like this...

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF4 Then
<... your code here...>
End If
End Sub

--
Steve Schapel, Microsoft Access MVP

Hi All..

I Have this code, it's work fine but I want to use F4 instead od DbClick
fuction, could you help me please how to do this.

Thanks.

------------------------------------------------------------------------------------------------
Private Sub List11_DblClick(Cancel As Integer)
[ModANDSize SubForm]![Cut Sheet] = [CUTS]
[ModANDSize SubForm]![ModeloANDsizeInfo] = "G:" & [Combo6].Column(1) & " "
& [List0] & " " & [List2].Column(1) & " " & [List4].Column(1) & "(" &
[List11].Column(1)
[ModANDSize SubForm]![Qty] = [List4]
[ModANDSize SubForm]![Text7] = [pkt]
DoCmd.GoToControl "ModANDSize SubForm"
DoCmd.GoToRecord , , acNewRec
List11.SetFocus



End Sub
----------------------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top