jamal2080 قام بنشر يناير 27, 2023 قام بنشر يناير 27, 2023 السلام عليكم ورحمة الله وبركاتة ارجوا مساعدة فى اعداد التقرير Database1.rar
jamal2080 قام بنشر يناير 27, 2023 الكاتب قام بنشر يناير 27, 2023 شكرا اخى على اهتمامك ولك منى الاحترام والتقدير
jamal2080 قام بنشر يناير 28, 2023 الكاتب قام بنشر يناير 28, 2023 الســـــــــــــــــــــــــــ((( عليكم ورحمه الله وبركاته )))ـــــــــــــــــلام اريد هذا كود ترجع على الحفظ اوتعديل ----- ارجوا افادة On Error GoTo Err_traghh_Click DoCmd.SetWarnings False Me.Job_ID.SetFocus If Me.flagsav = 1 And (IsNull(Me.Job_ID)) Then If MsgBox("åá ÈÇáÝÚá ÇáÊÑÇÌÚ Úä ÊÓÌíá ÇáÈíÇäÇÊ ¿", vbYesNo + vbCritical + vbMsgBoxRight + vbDefaultButton2, "ÊÍÐíÑ") = vbNo Then Exit Sub Else Me.flagsav = Null Me.Refresh Me.Requery Me.OrderByOn = True Me.OrderBy = "[Job_ID] DESC" End If MsgBox "Êã ÇáÊÑÇÌÚ Úä ÇáÊÓÌíá ÈäÌÇÍ.", 48, " " End If If (Not IsNull([Job_ID]) And Not IsNull(Me.flagsav) And (Me.flagsav = 1)) Then If MsgBox("åá ÊÑíÏ ÈÇáÝÚá ÇáÊÑÇÌÚ Úä ÊÓÌíá ÇáÈíÇäÇÊ ¿", vbYesNo + vbCritical + vbMsgBoxRight + vbDefaultButton2, "ÊÍÐíÑ") = vbNo Then Exit Sub Else On Error Resume Next With Me .AllowDeletions = True DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoCmd.RunCommand acCmdDeleteRecord DoCmd.RunCommand acCmdSaveRecord DoCmd.RunCommand acCmdRefresh Me.Requery Me.Refresh DoCmd.SetWarnings True .AllowDeletions = False .AllowEdits = True Me.OrderByOn = True Me.OrderBy = "[Job_ID] DESC" End With End If MsgBox "Êã ÇáÊÑÇÌÚ Úä ÇáÊÓÌíá ÈäÌÇÍ.", 48, " " End If If Me.flagsav = 2 Then If MsgBox("åá ÊÑíÏ ÈÇáÝÚá ÇáÊÑÇÌÚ Úä ÊÚÏíá ÇáÈíÇäÇÊ ¿", vbYesNo + vbCritical + vbMsgBoxRight + vbDefaultButton2, "ÊÍÐíÑ") = vbNo Then Exit Sub Else End If Me.Refresh With Me .AllowEdits = True End With MsgBox "Êã ÇáÊÑÇÌÚ Úä ÇáÊÚÏíá ÈäÌÇÍ.", 48, " " DoCmd.RunSQL "UPDATE EMPLOYEES INNER JOIN EMPLOYEES_Temp ON EMPLOYEES.Job_ID = EMPLOYEES_Temp.Job_ID SET Cars_ machinery.Job_ID = [EMPLOYEES_Temp]![Job_ID], EMPLOYEES.ID_cant = [EMPLOYEES_Temp]![Vehicle Type],Cars_ machinery.Vehicle Type = [EMPLOYEES_Temp]![Vehicle Type];" DoCmd.RunSQL "UPDATE Tabl_2 INNER JOIN Tabl_2_Temp ON Tabl_2.B_id = Tabl_2_Temp.B_id SET Tabl_2.FName = [Tabl_2_Temp]![FName], Tabl_2.Kinship = [Tabl_2_Temp]![Kinship];" DoCmd.RunSQL "DELETE Tabl_2.*, Tabl_2.Nn_Id, Tabl_2_Temp.B_id " & _ " FROM Tabl_2 LEFT JOIN Tabl_2_Temp ON Tabl_2.B_id = Tabl_2_Temp.B_id " & _ " WHERE (((Tabl_2.Nn_Id)=[Forms]![frm_F]![N_id]) AND ((Tabl_2_Temp.B_id) Is Null));" DoCmd.RunSQL "INSERT INTO Tabl_2 " & _ " SELECT Tabl_2_Temp.* " & _ " FROM Tabl_2 RIGHT JOIN Tabl_2_Temp ON Tabl_2.B_id = Tabl_2_Temp.B_id " & _ " WHERE (((Tabl_2.B_id) Is Null) AND ((Tabl_2_Temp.Nn_Id)=[Forms]![frm_F]![N_id]));" End If On Error Resume Next AllowAdditions = False AllowEdits = False AllowDeletions = False On Error GoTo 0 Me![cmdNext].Enabled = True Me![cmdPrevious].Enabled = True Me![cmdLast].Enabled = True Me![cmdFirst].Enabled = True Me![D_L].Enabled = True Me![seva].Enabled = False Me![cmdClose].Enabled = True Me![addnew].Enabled = True Me![Edit].Enabled = True Me![traghh].Enabled = False If DCount("*", "EMPLOYEES", "Job_ID") < 1 Then Me![addnew].Enabled = True Me![cmdNext].Enabled = False Me![cmdPrevious].Enabled = False Me![cmdLast].Enabled = False Me![cmdFirst].Enabled = Fals Me![D_L].Enabled = False Me![cmdcols].Enabled = True Me![Edit].Enabled = False Me![sav].Enabled = False Me![traghh].Enabled = False AllowAdditions = True AllowEdits = False AllowDeletions = False End If Me.flagsav = Null Me.traghh.Caption = "" DoCmd.SetWarnings True Exit_traghh_Click: Exit Sub Err_traghh_Click: MsgBox Err.DESCRIPTION Resume Exit_traghh_Click
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.