hi ppl i need bit of help in my vb coding.
I have a publish data onto datagrid and allow user to search for specific record by inputting no. everything going fine. however i was unable to inform the user if there is no matching record found. i tried to use following code (last elseif part). but it doesn't work in that way. any help ??? thanks in advance
Dim a As String
For i As Integer = 0 To DataGridView1.Rows.Count - 1
a = DataGridView1.Rows(i).Cells(0).Value
If a = textbox1.Text Then
'fill up data into textboxes
ElseIf textbox1.Text = "" Then
MsgBox("Please Scan card to Proceed")
textbox1.Focus()
Exit For
Elseif a <> textbox1.text then
MsgBox("No Record found")
Exit For
End If
Next