PC Review


Reply
Thread Tools Rate Thread

Database Search Results Help

 
 
=?Utf-8?B?VGhlIEJhcmQ=?=
Guest
Posts: n/a
 
      15th Dec 2005
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?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIEJ1eWVucw==?=
Guest
Posts: n/a
 
      15th Dec 2005
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


"The Bard" wrote:

> 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?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
database query help - 1 search 2 database results Doug Microsoft Frontpage 3 24th Aug 2006 11:23 AM
Need some help to modifiy a database to run a search using results of another search. Jurassic Microsoft Access Forms 1 12th Aug 2006 07:15 AM
Searching within search results (Database) Materialised Microsoft VB .NET 1 24th May 2006 01:21 AM
ASP Database Results and Search Form page displays results upon initial entry =?Utf-8?B?RGF0YWd1cnU=?= Microsoft Frontpage 3 27th Mar 2004 06:16 PM
Database search form & results =?Utf-8?B?RGVuaXNlIE0uIEdvZGZyZXk=?= Microsoft Frontpage 2 30th Dec 2003 02:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:48 AM.