جرب هذا
PHP كود :
Dim x As String
x = Text18.Text
Adodc1.RecordSource = "select * from carh where carnumbe='" & x & "'"
Adodc1.CommandType = adCmdText
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "القيمة غير موجودة", vbOKOnly + vbMsgBoxRight + vbInformation + vbMsgBoxRtlReading, "البحث"
Else
MsgBox "القيمة موجودة", vbOKOnly + vbMsgBoxRight + vbInformation + vbMsgBoxRtlReading, "البحث"
End If

