Hello, I've tried this code without using a where statement and it works fine, but as soon as I put one in I get this error:
Name 'dgResults' is not declared.
I tried declarion Putting Dim in front of it, and then all by itself..I don't get it. Thx in Advance

<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">

sub Page_Load(sender as Object, e as EventArgs)

Dim Find_Item = request.form("Find_Item")
'Create a connection string
Dim connString as String
connString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & _
"C:\Profiles\Databases\Profiles.mdb;"


Dim objConnection as OleDbConnection
objConnection = New OleDbConnection(connString)
objConnection.Open()


Dim strSQL as String = "SELECT * FROM Profiles WHERE First_Name = '" & Find_Item & "' "


Dim objCommand as OleDbCommand
objCommand = New OleDbCommand(strSQL, objConnection)


Dim objDataReader as OleDbDataReader
objDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection)


dgResults.DataSource = objDataReader
dgResults.DataBind()


objDataReader.Close()
end sub

</script>
<html>
<head>
</head>
<body>
<pre>&lt;aspataGrid id="dgResults" runat="server" /&gt;</pre>
</body>
</html>