Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic access asp search

Status
Not open for further replies.

obaluba

Technical User
Sep 24, 2001
49
GB
Hello,
I've got an access database, the results of which are produced on a webpage via asp.
What i would like to do is a basic search with a textbox where the user enters some criteria and if found the results appear.

The other thing i wanted to do was have a drop down box with certain criteria in it, ie; blue, red, green and when say red is selected it brings everything up in the database thats red!

are there any tutorials for this? Any quick solutions

thankyou very much in advance
 
For the textbox one.

first: get the value the user entered
Dim sUserVal

sUserVal = request("txtUserVal")

you need to second connect to db
Set conn = server.createobject("ADODB.COnnection")
Set rs = server.createobject("ADODB.Recordset")

conn.open CONN_STRING, USERID, PASSWORD
rs.open "Select * from DBTable where searchfield like %" & sUserVal & "%", conn

Dim sColor
sColor = request("cboColor")

do same select where fieldname = sCOlor

Hope this helps.


Delton.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top