Results 1 to 3 of 3

Thread: Query search

  1. #1
    Join Date
    Dec 2003

    Red face Unanswered: Query search

    I am trying to creat a query in access to search based on what is in another cell in another table. So far I am hitting a blank. Below is my query:

    SELECT qryEmailList.ClientID, tblClients.FirstName, tblClients.LastName, qryEmailList.Type, qryEmailList.Subject, qryEmailList.EMailMessage
    FROM tblCriteria, tblClients INNER JOIN qryEmailList ON tblClients.ID = qryEmailList.ClientID
    WHERE (((qryEmailList.EMailMessage)LIKE '%tblCriteria.Criteria%'));

    tblCriteria.Criteria is the table a cell where the search critieria is entered. qryEmailList.EMailMessage is what is being queried against. I want to be able to search for part or all of the field qryEmailList.EmailMessage with tblCriteria.Criteria. Any Help would be appreciated.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1

    LIKE "*" & tbl.Criteria.Criteria & "*"

    Unless you're using an adp, then use the % instead of the *
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2003

    Talking Thanks!

    That worked like a charm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts