اكتب الكود التالي بدل الكود السابق : ( عذرا لم اقرا الموضوع الا اليوم)
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Dim i, x, xx As Integer
x = Forms!frmx!frs.Value
xx = Forms!frmx!endd.Value
t1 = x
t2 = t1 + 1
If t2 = xx Then Exit Sub
t3 = t2 + 1
If t3 = xx Then Exit Sub
t4 = t3 + 1
If t4 = xx Then Exit Sub
t5 = t4 + 1
If t5 = xx Then Exit Sub
t6 = t5 + 1
If t6 = xx Then Exit Sub
t7 = t6 + 1
If t7 = xx Then Exit Sub
t8 = t7 + 1
If t8 = xx Then Exit Sub
t9 = t8 + 1
If t9 = xx Then Exit Sub
t10 = t9 + 1
If t10 = xx Then Exit Sub
t11 = t10 + 1
If t11 = xx Then Exit Sub
t12 = t11 + 1
If t12 = xx Then Exit Sub
t13 = t12 + 1
If t13 = xx Then Exit Sub
t14 = t13 + 1
If t14 = xx Then Exit Sub
t15 = t14 + 1
If t15 = xx Then Exit Sub
t16 = t15 + 1
If t16 = xx Then Exit Sub
t17 = t16 + 1
If t17 = xx Then Exit Sub
t18 = t17 + 1
If t18 = xx Then Exit Sub
t19 = t18 + 1
If t19 = xx Then Exit Sub
t20 = t19 + 1
If t20 = xx Then Exit Sub
t21 = t20 + 1
If t21 = xx Then Exit Sub
t22 = t21 + 1
If t22 = xx Then Exit Sub
t23 = t22 + 1
If t23 = xx Then Exit Sub
t24 = t23 + 1
If t24 = xx Then Exit Sub
t25 = t24 + 1
End Sub