Database Search Results Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, I've been reading some posts to help me with returning data from an
Access DB to a results page; however, in the DB Results Wizard I can set a
search field for only one field. For example, if have a firstname, lastname,
and perhaps email, I'd like the user to be able to get a result coming from
any of the 3 fields, not just one field.

How do I do this please?
 
If the visitor fills in, say, a text box named txtSearch, then on page 2 of
the wizard you would choose Custom Query and code a SQL statement along the
lines of:

SELECT * FROM mytable WHERE (firstname LIKE '%::txtSearch::%') OR (lastname
LIKE '%::txtSearch::'%') OR (email LIKE '%::txtSearch::%')

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
o--> Microsoft Visual Web Developer 2005 Express Edition: Build a Web Site
Now!
o--> Microsoft Office FrontPage 2003 Inside Out
o--> Microsoft Windows SharePoint Services Inside Out
o--> Faster Smarter Beginning Programming
 
Back
Top