Problems with Unmatched Query and a Filter

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi Everyone,
I'm in need of a Access Query for helping me get some
specific results.

I have two tables (UserTbl and AccessTbl).
Access table holds UserID and AccessID. So you can have
UserID several times depending on what they have access
too.

I want to be able to see a Query for those who are not
already in the AccessTbl for one specific "ID" that way I
can add them if I need too.

Example: UserTbl has Jim,Mark,Kim,Jenn
AccessTbl already has Jim(page4) and Kim(page4).

I need to be able to feed the query the ID "page4" and see
only Jenn and Mark.

The ID "page4" is the filter I need to apply to the
unmatched query. I've been through the help and some
online searches via google without luck. You all are my
last resort.

PS - This is for a ASP web page, if that matters. :)

Thanks in advance for all your help.
Chris
 
The query sql would be

SELECT userId FROM UserTbl WHERE userId NOT IN (SELECT
userId FROM AccessTbl WHERE accessId = [Enter Access Id])

Hope This Helps
Gerald Stanley MCSD
 
AHHHHhhhh! Thank you so much for your help. What a relief.
I guess I was looking at it from the wrong angle and
needed to use the "NOT IN" solution.

Thanks for teaching me a new idea and lesson.
You've made my weekend so you have a good one too Gerald.

Chris

-----Original Message-----
The query sql would be

SELECT userId FROM UserTbl WHERE userId NOT IN (SELECT
userId FROM AccessTbl WHERE accessId = [Enter Access Id])

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi Everyone,
I'm in need of a Access Query for helping me get some
specific results.

I have two tables (UserTbl and AccessTbl).
Access table holds UserID and AccessID. So you can have
UserID several times depending on what they have access
too.

I want to be able to see a Query for those who are not
already in the AccessTbl for one specific "ID" that way I
can add them if I need too.

Example: UserTbl has Jim,Mark,Kim,Jenn
AccessTbl already has Jim(page4) and Kim(page4).

I need to be able to feed the query the ID "page4" and see
only Jenn and Mark.

The ID "page4" is the filter I need to apply to the
unmatched query. I've been through the help and some
online searches via google without luck. You all are my
last resort.

PS - This is for a ASP web page, if that matters. :)

Thanks in advance for all your help.
Chris
.
.
 
Back
Top