or this
Private Sub Form_Load()
Dim intStore As Integer
smsm = DLookup("MASARDATE", "MASARDATE")
Dim smsm As Integer
intStore = DCount("[id_amlyat]", "[form_amlyat]", "[date end] <=smsm+2 AND [check_box] =-1 ")
If intStore = 0 Then
Exit Sub
Else
If MsgBox("found " & intStore &...