01-07-14, 04:30 PM
.....
.....
كود :
Private Sub Command1_Click()
Dim b1, b2 As String
b1 = Format(Me.Combo1.Text, "yyyy/MM")
b2 = Format(Me.Combo2.Text, "yyyy/MM")
Adodc1.RecordSource = "select * from bayan where FORMAT(dat,'yyyy/MM') Between '" & b1 & "' AND '" & b2 & "'"
Adodc1.CommandType = adCmdText
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
MsgBox "غير موجود", , "تنبيه"
End If
End Sub.....



