النجاشي قام بنشر نوفمبر 7, 2017 قام بنشر نوفمبر 7, 2017 السلام عليكم ورحمه الله وبركاته اخواني الكرام اريد تعديل هذا الكود بالطريقه الصحيحه On Error Resume Next Dim n As String: Dim i As Integer: Dim isopen As Boolean n = "frmSales" isopen = False For i = 0 To Forms.Count - 1 If Forms(i).FormName = n Then isopen = True End If Next i If isopen Then ' temp_MYn1 = Me.sfrm_Search!MYn1 Select Case KeyCode Case vbKeyDown Case vbKeyUp Case vbKeyReturn ' Me.frm_Search_New.Form.RecordsetClone.FindFirst "[Rajmsanf]='" & Me.sfrm_Search_New!MYn1 & "'" DoCmd.OpenForm "frmEdrajSenf" Forms![frmEdrajSenf]![Rajmsanf] = Form.RecordsetClone!Rajmsanf Forms![frmEdrajSenf]![NaEMP] = Form.RecordsetClone!NaEMP Forms![frmEdrajSenf]![sarabaih] = Form.RecordsetClone!sarabaih DoCmd.close acForm, "frm_Search_New", acSaveNo End Select Else Select Case KeyCode Case vbKeyDown If KeyCode = vbKeyUp Then DoCmd.GoToRecord , , acPrevious End If If KeyCode = vbKeyDown Then DoCmd.GoToRecord , , acNext End If Case vbKeyUp If KeyCode = vbKeyUp Then DoCmd.GoToRecord , , acPrevious End If If KeyCode = vbKeyDown Then DoCmd.GoToRecord , , acNext End If Case vbKeyReturn ' Me.sfrm_Search.Form.RecordsetClone.FindFirst "[Rajmsanf]='" & Me.sfrm_Search!MYn1 & "'" DoCmd.OpenForm "frmEdrajSenf2" Forms![frmEdrajSenf2]![Rajmsanf] = Me.Rajmsanf Forms![frmEdrajSenf2]![NaEMP] = Me.NaEMP DoCmd.close acForm, "frm_Search_New", acSaveNo ' KeyCode = 0 End Select End If شاكرين لكم احبتي
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.