Originally Posted by pame1la
Private Sub Serach_Click()
If txtName.Text = "" Then
MsgBox "Please enter product name", vbOKOnly, "Search Error"
Else
Str = "SELECT * From Details WHERE ItemName = '" & txtName.Text & "'"""
rs.Open strTemp, gcnSV, adOpenForwardOnly, adLockReadOnly
If rs.State = 0 Then
MsgBox "No records match", vbOKOnly, "Search Result"
or
Private Sub Serach_Click()
If txtName.Text = "" Then
MsgBox "Please enter product name", vbOKOnly, "Search Error"
Else
Str = "SELECT * From Details WHERE ItemName = '" & txtName.Text & "'"""
If Str = "" Then
MsgBox "No records match", vbOKOnly, "Search Result"
WHAT AM I DOIN WRONG?