S
SteveM
You need to give us a bit more information about what you are trying to do...
What is the result of the query as posted?
Steve
What is the result of the query as posted?
Steve
The first one returns all SDPrivID where the SecurityID mtches the TxtIDSteveM said:You need to give us a bit more information about what you are trying to do...
What is the result of the query as posted?
Steve
:
Well here we go again. I'm having difficulty elminating the QNoMatch
and replacing it with code any help appreciated.
Thanks
DS
"SELECT tblPrivileges.PrivID, tblPrivileges.PrivName,
[QNoMatch].SDPrivID, " & _
"tblPrivileges.PrivType, tblPrivileges.PrivActive " & _
"FROM [QNoMatch] RIGHT JOIN tblPrivileges ON [QNoMatch].SDPrivID =
tblPrivileges.PrivID " & _
"WHERE (((tblPrivileges.PrivName) Not Like ""Title"") " & _
"AND (([QNoMatch].SDPrivID) Is Null) " & _
"AND ((tblPrivileges.PrivType)=1) " & _
"AND ((tblPrivileges.PrivActive)=-1)) " & _
"ORDER BY tblPrivileges.PrivName;"
The Contents Of QNoMatch
SELECT tblSecurityDetails.SecurityID, tblSecurityDetails.SDPrivID
FROM tblSecurityDetails
WHERE
(((tblSecurityDetails.SecurityID)=[Forms]![frmBSSecurityNames]![TxtID]));
DS said:I'm trying to pull records from tblPrivilege that are not in tblSecuritySteveM said:I still don't know what you are trying to achieve!
Steve
:
I know it's a mess but I think it's something like this...???
"SELECT tblPrivileges.PrivID, tblPrivileges.PrivName " & _
"FROM tblPrivileges " & _
"WHERE (((tblPrivileges.PrivName) Not Like ""Title"") " & _
"AND ((tblSecurityDetails.SDPrivID) Is Null) " & _
"AND ((tblPrivileges.PrivType)=1) " & _
"AND ((tblPrivileges.PrivActive)=-1)) " & _
UNION SELECT
SELECT tblSecurityDetails.SecurityID, tblSecurityDetails.SDPrivID
FROM tblSecurityDetails
WHERE
(((tblSecurityDetails.SecurityID)=[Forms]![frmBSSecurityNames]![TxtID]));
"ORDER BY tblPrivileges.PrivName;"
Details.
DS
DS said:I'm trying to pull records from tblPrivilege that are not in tblSecuritySteveM said:I still don't know what you are trying to achieve!
Steve
:
I know it's a mess but I think it's something like this...???
"SELECT tblPrivileges.PrivID, tblPrivileges.PrivName " & _
"FROM tblPrivileges " & _
"WHERE (((tblPrivileges.PrivName) Not Like ""Title"") " & _
"AND ((tblSecurityDetails.SDPrivID) Is Null) " & _
"AND ((tblPrivileges.PrivType)=1) " & _
"AND ((tblPrivileges.PrivActive)=-1)) " & _
UNION SELECT
SELECT tblSecurityDetails.SecurityID, tblSecurityDetails.SDPrivID
FROM tblSecurityDetails
WHERE(((tblSecurityDetails.SecurityID)=[Forms]![frmBSSecurityNames]![TxtID]));
"ORDER BY tblPrivileges.PrivName;"
Details.
DS
I'm trying to pull records from tblPrivilege that are not in tblSecuritySteveM said:I still don't know what you are trying to achieve!
Steve
:
I know it's a mess but I think it's something like this...???
"SELECT tblPrivileges.PrivID, tblPrivileges.PrivName " & _
"FROM tblPrivileges " & _
"WHERE (((tblPrivileges.PrivName) Not Like ""Title"") " & _
"AND ((tblSecurityDetails.SDPrivID) Is Null) " & _
"AND ((tblPrivileges.PrivType)=1) " & _
"AND ((tblPrivileges.PrivActive)=-1)) " & _
UNION SELECT
SELECT tblSecurityDetails.SecurityID, tblSecurityDetails.SDPrivID
FROM tblSecurityDetails
WHERE
(((tblSecurityDetails.SecurityID)=[Forms]![frmBSSecurityNames]![TxtID]));
"ORDER BY tblPrivileges.PrivName;"
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.