اتفضل عن طريق الكود هذا
Dim varFilter As Variant
varFilter = Null
If Not IsNull(Me.X) Then
varFilter = "[nume] LIKE '*" & Me.X & "*'"
End If
' كود البحث بين تاريخين
If Not IsNull(Me.STR) Or IsNull(Me.IND) Then
varFilter = (varFilter + " AND ") & "[dateTraining] Between STR And IND"
End If
With Me.frmsub.Form
If Not IsNull(varFilter) Then
.DataEntry = False
.Filter = varFilter
.FilterOn = True
Else
.FilterOn = False
End If
.Requery
End With
Database21.accdb