Private Sub cmdFind_Click()
Dim sLastName As String
Dim sSQL As String
'Build SQL QUERY
sSQL = "SELECT * from Customer"
sLastName = InputBox$("Enter Last Name:")
If sLastName <> "" Then sSQL = sSQL & " WHERE LastName ='" &
sLastName & "'"
'UPDATE THE ADO DATA C0NTROL
Customer.CommandType = adCmdText
Customer.RecordSource = sSQL
Customer.Refresh
End Sub
--
Patrick Goupell
http://www.nite.org
http://www.noneusa.org