Query problem

rockyjr

Registered User.
Local time
Today, 13:25
Joined
Mar 12, 2008
Messages
100
I have a form which I enter calls coming in for our work. One or more person can work on a call. So I can see who worked on every call.

Table info
[ID] [TITLE] [employee1] [employee2] [employee3] ......

What I wanted to do is to, is to created a query that will give me all the calls an employee worked on.....

His name could be on field [employee1], [employee2], or [employee3]

Thanks in advance boys.... for some reason I just cant figure this one out!!! :(

Luc
 
Not sure this is a good design but isn't it a case of
Where employee1=hisname or enployee2 = hisname or employee3 =hisname

Brian
 
Ya,.... I tried that... didnt work....

I'm getting the error, "This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

the code is :
Code:
SELECT Calls.ID, Calls.[employee 1], Calls.[employee 2], Calls.[employee 3]
FROM Calls
WHERE Calls.[employee 1]=[txtemplo] or Calls.[employee 2]=[txtemplo] 
or Calls.[employee 3]=[txtemplo];
 
I presume txtemplo is a paramer prompt, couldn't believe it wouldn't work so just tested, it worked for me.

SELECT Table1.id, Table1.e1, Table1.e2, Table1.e3
FROM Table1
WHERE Table1.e1= [txtemplo] OR Table1.e2 =[txtemplo] OR Table1.e3=[txtemplo];

Brian
 
I'm an idiot... instead of putting the ID # of the employee, I was entering the full name... that's why it was giving the error....

Works fine now.... thx
 

Users who are viewing this thread

Back
Top Bottom