Re: Troubles with "OR"



1. "Like" should always be used with wild-cards. Otherwise, use " = " as
Ofer advised.

2. The parentheses are not correct in the WHERE clause. For posting, it is
better to copy and paste (and add new lines for clarity) to avoid typing
mistakes.

--
HTH
Van T. Dinh
MVP (Access)



"aaearhart" <aaearhart@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:54F1E957-056E-4D24-8F52-24AC0F77199B@xxxxxxxxxxxxxxxx
> SELECT tbl_Projects.[ProjectName],
> tbl_Projects.[ProjectNumber],
> tbl_Projects.[ProjectManager],
> tbl_Projects.[OnsiteLD],
> tbl_Projects.[Onsite Assistant]
> FROM tbl_Projects
> WHERE (((tbl_Projects.[ProjectManager]) Like [Enter last name]
> OR (tbl_Projects.[Onsite LD]) Like [Enter last name]
> OR (tbl_Projects.[Onsite Assistant]) Like [Enter last name]));
>
> I would like to enter the last name only once and have the query search
all
> three fields, but this does not seem to be happening.
>
> any hints?
>
> /amelia


.



Relevant Pages

  • Re: Troubles with "OR"
    ... The parentheses are not correct in the WHERE clause. ... For posting, it is ... Then I added new lines for clarity. ...
    (microsoft.public.access.queries)
  • Re: any thoughts please?!
    ... please to help if you see me posting again and agian dont get bored ... as a first task i want to "Produce total sales per Product ... ORDE PR ... may be necessary to add an ORDER BY clause after the GROUP BY clause: ...
    (comp.databases.oracle.server)
  • where clause
    ... After posting to the newsgroup I thought I should post to the dbi-users mailing list instead. ... I am unable to get a where clause to work against MS SQL Server. ... SELECT TOP 201 AuUnique, AuRIN, AuCaseID, AuFirstName, AuLastName, AuMiddleInitial, AuSSN FROM Authorize WHERE (AuFirstName LIKE ...
    (perl.dbi.users)
  • Re: receiving a carrier
    ... the discussion procedded nicely without bitching about top vs bottom posting. ... This whole thread is about clarity. ...
    (sci.electronics.design)
  • Re: A suggestion for responding to posts on s.a.a.... please put the quotes at the bottom!
    ... opinions as if they are facts that prove their position. ... sometimes clarity is best served by bottom ... posting works best. ...
    (sci.astro.amateur)