This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > December 2005 > Database search





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Database search
ylafont

2005-12-11, 6:35 pm

I have an access database, which I have built an search form for. The search
details pages are working however the search strings needs to the entire string
that exist in the column. If part of a string is entered, the results are
blank.

For example. if a row within the column contains the ?This is the search
string? I cannot type in the word ?string? and have the results appear. ?This
is the search string? will need to be entered in order for the records to be
displayed.

Is this the way it is supposed to work?


Spacecase3785

2005-12-12, 10:16 pm

To search for a keyword anywhere in the field wrap your keyword in the WHERE
clause with %:

" WHERE [yourfield] LIKE '%" & yourkeyword & "%'"

If you only use the last % it will search for keyword at the start of field
If you only use the first % it will search for keyword at the end of field

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews