Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent : Not in table query

Status
Not open for further replies.

zaphy2k2

Programmer
Dec 23, 2001
30
GB
Hi,

i have a set-up like :

{Users] [Event]
*UserID 1->M UserID
Name EventID

something like :
Select * from users where [Event] doesnt contain userID for a certain eventID.

so, if i had :
[Users]
1234 | Eve
2345 | Adam


and

[Event]
5678 | 02
2345 | 02

for event 02
Eve would be selected because she has not signed up for that event. Adam would not, because he is signed up for (EventID[02]). This is driving me nuts, i just cant get the query right. The [EventID] comes from a form, and produces the contents of a list box.

I think this is clear ...
 
What about something like this:

SELECT Users.userid, Users.name, Events.userid, Events.eventid
FROM Users LEFT JOIN Events ON Users.userid = Events.userid
WHERE (((Events.eventid)<>[x]));


where [x] would be the eventid entered from the form J. Jones
jjones@cybrtyme.com
 
Replace 'x' with [tt] Forms!frmYourForm!txtYourText[/tt] Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top