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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do a search engine in access??? 2

Status
Not open for further replies.

jonra

Programmer
Jul 20, 2003
42
0
0
SG
i want to create a search engine using a form...izzit possible??...if yes may i noe how to do it?...
 
Yes its possible
there are many threads regarding this subject
try searching the site with "Search" as the Subject

Hope this helps
Hymn
 
What do you mean by a seach engine. Implying and 'engine' makes me wonder what you mean. If you mean a textbox and a search this is best done, in my opinion, with VB code. Want the code for this??? Ask. I do not wish to anser questions no one is asking.


rollie@bwsys.net
 
Rolliee (Programmer) Jul 21, 2003

This may not be the question he needed answered, but it is the one I am looking for! I have written VB code to do this kind of search, oh, about 2 years ago:(, and alas, i have forgotten how, or it is not working in my current version of access (2002). I am trying to get it do search using wildcards, so that i can type in part of the name (searching for companies) ie: Cleaning; and have it bring up all companies where ever the word appears, first, middle, or last. I would love to see your code to determine where I went wrong. Thank you so much.
 
have a look at thread702-563930

Hope this helps
Hymn
 
ALuce or anyone,

This uses a textbox to hold an embedded string that I wish to search for in the form's bound record source.


Dim rs As DAO.Recordset, okay As Boolean

If IsNull(Me.Text22) Then
MsgBox "You input a NULL string."
Exit Sub
End If
okay = False
Set rs = Me.RecordsetClone
If rs.EOF And rs.BOF Then
MsgBox "No Records in the 'DESC' database."
rs.Close
Set rs = Nothing
Exit Sub
End If
rs.MoveLast
rs.MoveFirst
Do While Not rs.EOF

If InStr(rs![DESCR], Me.Text22) > 0 Then
okay = True
Exit Do
End If
rs.MoveNext
Loop
If okay Then
Me.Bookmark = rs.Bookmark

Else
MsgBox "I did not find your string in any 'Decsription.'"
End If
Me.Text22 = ""

rs.Close
Set rs = Nothing


Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top