RE: Match Criteria or display All Records

From: SufferingSharon (SufferingSharon_at_discussions.microsoft.com)
Date: 08/11/04


Date: Wed, 11 Aug 2004 03:35:04 -0700

Thanks Anne,

I don't how it worked, but it did!

I think they want to do an OR multiple search and it's really causing me
grief. I have one field called Keyword in the Customer Table, the idea is
that they will separate with commas (text data type 255 chars).

They want to input say nine search words and find all companies that meet
any one of those criteria.

Any ideas?

Sharon

"anonymous@discussions.microsoft.com" wrote:

> Hey Sharon -
>
> To handle the null records put the forms!searchFrm!
> SearchBox on the field line of a new column in your query
> and then in the criteria line put Is Null on an or line.
>
> The SQL would be something like;
> SELECT Table1.*
> FROM Table1
> WHERE (((Table.FieldToSearch) Like "*" & [Forms]!
> [searchform]![seachfield] & "*")) OR ((([Forms]!
> [searchform]![seachfield]) Is Null));
>
> To do multiple keywords search is more complicated. When
> you say they want to search for >1 keyword do you mean
> they want to return any record that has at least one of
> the keywords they enter? OR do you mean return any record
> that has ALL of the keywords they enter?
>
> - Anne
>
>
>
> >-----Original Message-----
> >I am trying to build a query which will allow me to
> search multiple fields
> >via a form. The majority of it works OK, but when I try
> to search on the
> >'Keywords' field; I only see those records who are not
> null. Not all records
> >will have an entry in this field. If I don't enter any
> criteria, I don't get
> >any records!
> >
> >How can I build the query to say "If the Forms!SearchFrm!
> SearchBox is Null,
> >display all records, else display records that match
> SearchBox".
> >
> >Currently the query states LIKE"*" & forms!
> searchFrm!SearchBox &"*"
> >
> >Also, they want to be able to search for a few keywords
> at one time. Can it
> >be done?
> >--
> >Many thanks
> >S.
> >.
> >
>



Relevant Pages

  • Re: Does SQL2005 still require all FTI keywords to match in the same column?
    ... This improvement also will improve multiple CONTAINS queries, so you will not longer experiment pain. ... Does SQL2005 still require all FTI keywords to match in the same column? ... SQL Server excels at storing all ... FTS side of the equation. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Using check boxes to select items in a multi select list box
    ... before (multiple addresses per contact, ... enters data to filter on. ... criteria selections to it like this: ... tblTrialDoc, tblKeywords (list of keywords to ...
    (microsoft.public.access.forms)
  • Re: List Box Question
    ... > Does the below mean that multiple values cannot be saved ... Say you had a database of books and you wanted to ... keywords to find certain types of books. ... enter the list of keywords in the subform associated with each book. ...
    (microsoft.public.access.formscoding)
  • Re: List Box Question
    ... > Does the below mean that multiple values cannot be saved ... Say you had a database of books and you wanted to ... keywords to find certain types of books. ... enter the list of keywords in the subform associated with each book. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Document Properties - Category & Keywords menu
    ... See the article "How to create a Userform" at: ... >> Please reply to the newsgroup unless you wish to avail yourself of my ... >>> Give the nature of the organization (multiple departments with multiple ... >>> categories and keywords to each user and having them open the document, ...
    (microsoft.public.word.docmanagement)