A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Database Keyword Search



 
 
Thread Tools Display Modes
  #1  
Old February 26th, 2009, 02:52 PM posted to microsoft.public.access.gettingstarted
redant via AccessMonster.com
external usenet poster
 
Posts: 18
Default Database Keyword Search

I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that
works good. Now I have to be able to type in two non adjacent words that may
be in a course title. ANy idea on how to get started or where? Thank you.

%
Dim rsKeySearchCourses__MMColParam
rsKeySearchCourses__MMColParam = "1"
If (Request.QueryString("txtKeywords") "") Then
rsKeySearchCourses__MMColParam = Request.QueryString("txtKeywords")
End If
%
%
Dim rsKeySearchCourses
Dim rsKeySearchCourses_cmd
Dim rsKeySearchCourses_numRows

Set rsKeySearchCourses_cmd = Server.CreateObject ("ADODB.Command")
rsKeySearchCourses_cmd.ActiveConnection = MM_cnnTrainingWebsite_STRING
rsKeySearchCourses_cmd.CommandText = "SELECT * FROM AllCourses WHERE Title
LIKE ? ORDER BY Title ASC"
rsKeySearchCourses_cmd.Prepared = true
rsKeySearchCourses_cmd.Parameters.Append rsKeySearchCourses_cmd.
CreateParameter("param1", 200, 1, 255, "%" + rsKeySearchCourses__MMColParam +
"%") ' adVarChar

Set rsKeySearchCourses = rsKeySearchCourses_cmd.Execute
rsKeySearchCourses_numRows = 0
%

--
Message posted via http://www.accessmonster.com

  #2  
Old February 26th, 2009, 05:03 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Database Keyword Search

Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"redant via AccessMonster.com" u49508@uwe wrote in message
news:9249c09fe964c@uwe...
I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that
works good. Now I have to be able to type in two non adjacent words that
may
be in a course title. ANy idea on how to get started or where? Thank you.

%
Dim rsKeySearchCourses__MMColParam
rsKeySearchCourses__MMColParam = "1"
If (Request.QueryString("txtKeywords") "") Then
rsKeySearchCourses__MMColParam = Request.QueryString("txtKeywords")
End If
%
%
Dim rsKeySearchCourses
Dim rsKeySearchCourses_cmd
Dim rsKeySearchCourses_numRows

Set rsKeySearchCourses_cmd = Server.CreateObject ("ADODB.Command")
rsKeySearchCourses_cmd.ActiveConnection = MM_cnnTrainingWebsite_STRING
rsKeySearchCourses_cmd.CommandText = "SELECT * FROM AllCourses WHERE Title
LIKE ? ORDER BY Title ASC"
rsKeySearchCourses_cmd.Prepared = true
rsKeySearchCourses_cmd.Parameters.Append rsKeySearchCourses_cmd.
CreateParameter("param1", 200, 1, 255, "%" +
rsKeySearchCourses__MMColParam +
"%") ' adVarChar

Set rsKeySearchCourses = rsKeySearchCourses_cmd.Execute
rsKeySearchCourses_numRows = 0
%

--
Message posted via http://www.accessmonster.com



  #3  
Old February 26th, 2009, 05:41 PM posted to microsoft.public.access.gettingstarted
redant via AccessMonster.com
external usenet poster
 
Posts: 18
Default Database Keyword Search

Well maybe it's a VB question. I need to search my MS Access DB using a web
form.

Jeff Boyce wrote:
Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP

I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that

[quoted text clipped - 27 lines]
rsKeySearchCourses_numRows = 0
%


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200902/1

  #4  
Old February 26th, 2009, 07:55 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Database Keyword Search

One approach might be to use Access to develop the 'bones' of the SQL you'd
use ... open a new query, design the query, switch to SQL view and
copy/paste.

But if you are using something other than the Access front-end, the exact
SQL syntax may vary...

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP


"redant via AccessMonster.com" u49508@uwe wrote in message
news:924b3b7ec1e0c@uwe...
Well maybe it's a VB question. I need to search my MS Access DB using a
web
form.

Jeff Boyce wrote:
Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP

I created a keyword search in Dreamweaver that searches the title only of
a
list of courses. I can type in an exact phrase or part of a word and
that

[quoted text clipped - 27 lines]
rsKeySearchCourses_numRows = 0
%


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200902/1



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.