Query type ?

PhilipEwen

Registered User.
Local time
Today, 00:41
Joined
Jun 11, 2001
Messages
81
Hi,
I am really stuck with this, so please someone help!

I have results form a previous dynamic query saved as 'queryxxxx'.

this query kicks out the following:

id
name
company

I am trying to re-query these results to show who this contact belongs to ( can be multiple users ). The associations are stored in a table ( staff_to_contact ) and simply have staff_pk and contact_pk

Therefore what i really want to do is something like:

select * from queryxxxx WHERE queryxxxx.id = staff_to_contact.contact_pk AND staff_to_contact.staff_pk=[forms].[form].[textbox]

This is all fairly simple-ish. My problem lies in when i want to select more than one staff member and only return the results where BOTH staff memebrs are associated to the contact.

What sort of query should i be using ?
How would this be formatted ?
Any ideas....

Many thanks
 
use the IN statement or create an OR clause ....

Hope you can work it out...

Regards
 
Sorry, could you elaborate a bit please.

Your help is appreciated.
 

Users who are viewing this thread

Back
Top Bottom