Private Sub Command15_Click()
Dim strSQL1, strSQL2, strSQL3 As String
strSQL1 = "SELECT qrySplitName.txtName, qrySplitName.firstname, qrySplitName.secondname, qrySplitName.thirdname, qrySplitName.forthname, qrySplitName.familyname ,qrySplitName.noSpace INTO tblTemp FROM qrySplitName"
strSQL2 = "DELETE Table1.* FROM Table1"
strSQL3 = "INSERT INTO Table1 SELECT tblTemp.* FROM tblTemp"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL1
DoCmd.RunSQL strSQL2
DoCmd.RunSQL strSQL3
DoCmd.SetWarnings True
Me.Requery
DoCmd.DeleteObject acTable, "tblTemp"
MsgBox "تم التقسيم بنجاح", vbInformation
End Sub
إرسال تعليق