تفضل يا صديقي ,, التعديل على جميع الجمل الشرطية في التقرير
Option Compare Database
Private Sub Report_Open(Cancel As Integer)
If Forms!form1.Check1 = False And Forms!form1.Check2 = False Then
MsgBox "NoChose"
DoCmd.CancelEvent
ElseIf Forms!form1.Check1 = True And Forms!form1.Check2 = False Then
Me.date2.Width = 0
ElseIf Forms!form1.Check2 = True And Forms!form1.Check1 = False Then
Me.date1.Width = 0
End If
End Sub
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
If Forms!form1.Check1 = True And Forms!form1.Check2 = True Then
Me.R.Value = Me.AccessTotalsdate1 + Me.AccessTotalsdate2
ElseIf Forms!form1.Check1 = True And Forms!form1.Check2 = False Then
Me.R.Value = Me.AccessTotalsdate1
ElseIf Forms!form1.Check2 = True And Forms!form1.Check1 = False Then
Me.R.Value = Me.AccessTotalsdate2
End If
End Sub
2.accdb