davidc2
07-22-2006, 06:51 AM
A user types an e-mail, if the e-mail exists display the information related to that e-mail (i.e. the other fields in the table) if not display a message saying nothing was found.
I used an Access Data Source, on it I'm doing this on the Select Command:
SELECT * FROM [table01] where email = ?
variables:
email = textBox1.text
There's a ViewGrid that uses that Data Source.
Now, the thing with this next part it's that it is checking on the values of the 'previous' page...
I'm trying to display a message saying that nothing was found.
When the user clicks on the 'search' button I run this
If Me.GridView1.Rows.Count = 0 Then
Label3.Text = "Not found"
Else
Label3.Text = "Found " & TextBox1.Text
End If
This is happening because I'm 'populating' the ViewGrid before this coded gets executed, I want to know how to do it the other way... To "search" for the e-mail and then do the Select Command..
I hope you guys can give me a hand with that...
I used an Access Data Source, on it I'm doing this on the Select Command:
SELECT * FROM [table01] where email = ?
variables:
email = textBox1.text
There's a ViewGrid that uses that Data Source.
Now, the thing with this next part it's that it is checking on the values of the 'previous' page...
I'm trying to display a message saying that nothing was found.
When the user clicks on the 'search' button I run this
If Me.GridView1.Rows.Count = 0 Then
Label3.Text = "Not found"
Else
Label3.Text = "Found " & TextBox1.Text
End If
This is happening because I'm 'populating' the ViewGrid before this coded gets executed, I want to know how to do it the other way... To "search" for the e-mail and then do the Select Command..
I hope you guys can give me a hand with that...