اسف مش هاعرف ارفق الملف لانه كبير بس تقريبا لازم افصل الاكواد عن بعضها
Private Sub ÃãÑ24_Click()
On Error GoTo g:
If MsgBox(" åá ÇäÊ ãÊÃßÏ ¿", _
vbCritical + vbYesNo, _
"ÊäÈíå") = vbNo Then
Exit Sub
Else
Dim i As Integer
Dim x As Date
DoCmd.GoToRecord , , acNewRec
x = Forms![DataMasterForm]![test1]![Date_M]
For i = 0 To Forms![DataMasterForm]![test1]![no] - 1
Me.date1 = Forms![DataMasterForm]![test1]![Date_M]
Me.serial = Forms![DataMasterForm]![test1]![serial]
Me.date1 = x
Me.no = DateAdd("d", i, Forms![DataMasterForm]![test1]![no1])
DoCmd.GoToRecord , , acNext
x = DateAdd("d", Forms![DataMasterForm]![test1]![no2], x)
Next
DoCmd.Requery
End If
DoCmd.GoToRecord , , acLast
Forms![DataMasterForm]![ends1] = Me.date1
g: Exit Sub
End Sub
اخر سطرين عاوز افصلهم عن الى فوق
DoCmd.GoToRecord , , acLast
Forms![DataMasterForm]![ends1] = Me.date1